CentOS7安装Neo4j

Linux安装Neo4j

环境:CentOS7

一、预备

1.JDK17安装

安装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
2.解压
mkdir /usr/local/java
tar -xzvf /opt/jdk-17_linux-x64_bin.tar.gz -C /usr/local/java
3.配置环境变量
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=.: JAVAHOME/lib/exportPATH=.:JAVA_HOME/bin:$PATH

source /etc/profile
4.关闭防火墙
systemctl stop firewalld
systemctl disable firewalld

二、安装Neo4j

1.下载

下载 Neo4j 5.x 简体中文版

2.解压
mkdir /usr/local/neo4j
tar -xf /opt/neo4j-chs-community-5.7.0-unix.tar.gz -C /usr/local/neo4j
3.修改配置
neo4j-chs-community-5.7.0-unix/conf/neo4j.conf
chmod 777 -R /usr/local/neo4j/

添加如下配置

server.default_listen_address=0.0.0.0

4.添加服务
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
5.启动服务
systemctl start neo4j
systemctl enable neo4j
6.打开网页

http://127.0.0.1:7474/browser/

你可能感兴趣的:(neo4j)