环境:CentOS7
安装wget,下载jdk17安装包
yum install wget
cd /opt
wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz
#或者浏览器打开https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz直接下载,然后上传到虚拟机/opt
mkdir /usr/local/java
tar -xzvf /opt/jdk-17_linux-x64_bin.tar.gz -C /usr/local/java
vi /etc/profile
#添加如下内容
export JAVA_HOME=/usr/local/java/jdk-17.0.7 #对应java版本
export CLASSPATH=.: J A V A H O M E / l i b / e x p o r t P A T H = . : JAVA_HOME/lib/ export PATH=.: JAVAH?OME/lib/exportPATH=.:JAVA_HOME/bin:$PATH
source /etc/profile
systemctl stop firewalld
systemctl disable firewalld
mkdir /usr/local/neo4j
tar -xf /opt/neo4j-chs-community-5.7.0-unix.tar.gz -C /usr/local/neo4j
neo4j-chs-community-5.7.0-unix/conf/neo4j.conf
chmod 777 -R /usr/local/neo4j/
添加如下配置
server.default_listen_address=0.0.0.0
vi /usr/lib/systemd/system/neo4j.service
[Unit]
Description=neo4j Service
[Service]
User=root
ExecStart=/usr/local/neo4j/neo4j-chs-community-5.7.0-unix/bin/neo4j console
Environment="JAVA_HOME=/usr/local/java/jdk-17.0.7"
[Install]
WantedBy=multi-user.target
systemctl start neo4j
systemctl enable neo4j
http://127.0.0.1:7474/browser/