Centos下neo4j安装和设置开机自启动. 1. 资源准备 CentOS 7.4 jdk 1.8+ neo4j-commUnity-3.5.13 https://neo4j.com/artifact.PHP?name=neo4j-c
https://neo4j.com/artifact.PHP?name=neo4j-community-3.5.13-unix.tar.gz
tar -zxvf neo4j-community-3.5.13-unix.tar.gz
dbms.connectors.default_listen_address=0.0.0.0
./neo4j start
vim start.sh
#!/bin/bash
export JAVA_HOME=/opt/jdk1.8.0_161
export PATH=$JAVA_HOME/bin:$PATH
sh /opt/neo4j-enterprise-3.5.3/bin/neo4j start
vim stop.sh
#!/bin/bash
export JAVA_HOME=/opt/jdk1.8.0_161
export PATH=$JAVA_HOME/bin:$PATH
sh /opt/neo4j-enterprise-3.5.3/bin/neo4j stop
进入/usr/lib/systemd/system目录,创建neo4j.service文件
cd /usr/lib/systemd/system
vim neo4j.service
添加脚本:
[Unit]
Description=neo4j
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
ExecStart=/opt/neo4j-enterprise-3.5.3/bin/start.sh
ExecStop=/opt/neo4j-enterprise-3.5.3/bin/stop.sh
PrivateTpm=true
[Install]
WantedBy=multi-user.target
systemctl enable neo4j.service
reboot
服务器重启过后再次访问http://localhost:7474
neo4j真香!
--结束END--
本文标题: centos下neo4j安装和设置开机自启动.
本文链接: https://lsjlt.com/news/2952.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0