当前位置:   article > 正文

CentOS7安装Neo4j

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
  • 1
  • 2
  • 3
  • 4
2.解压
mkdir /usr/local/java
tar -xzvf /opt/jdk-17_linux-x64_bin.tar.gz -C /usr/local/java
  • 1
  • 2
3.配置环境变量
vi /etc/profile
  • 1

#添加如下内容
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
  • 1
4.关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
  • 1
  • 2

二、安装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
  • 1
  • 2
3.修改配置
neo4j-chs-community-5.7.0-unix/conf/neo4j.conf
chmod 777 -R /usr/local/neo4j/
  • 1
  • 2

添加如下配置

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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
5.启动服务
systemctl start neo4j
systemctl enable neo4j
  • 1
  • 2
6.打开网页

http://127.0.0.1:7474/browser/

本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/897559
推荐阅读
相关标签
  

闽ICP备14008679号