CentOS7安装Neo4j

2024-01-08 06:18:09

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=.: JAVAH?OME/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/

文章来源:https://blog.csdn.net/qq_41631913/article/details/135403236
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。