当前位置:   article > 正文

Centos安装Neo4j

centos安装neo4j

Centos安装Neo4j

背景

Centos8环境下,安装neo4j图形数据库

Java安装

Java下载

安装neo4j数据库需要先安装Java,利用yum源来安装jdk。
查看yum库中的java安装包 :yum -y list java*
安装需要的jdk版本的所有java程序:yum -y install java-11-openjdk.x86_64
:若此处出现报错Error: Failed to download metadata for repo ‘AppStream‘: Cannot prepare internal mirrorlist,使用如下语句:

sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
  • 1
  • 2

配置环境变量

CentOS 8 默认 JDK 安装路径在 /usr/lib/jvm/ 目录下、配置文件为 vim /etc/profile

# 打开配置文件
vim /etc/profile

# 末尾插入
export JAVA_HOME=/usr/lib/jvm/jre-11-openjdk-11.0.13.0.8-4.el8_5.x86_64
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

# 激活配置文件
source /etc/profile
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

neo4j安装

neo4j下载

官网下载社区版压缩包
在这里插入图片描述
解压:

tar -axvf neo4j-community-4.4.6-unix.tar.gz
  • 1

修改配置文件neo4j.conf

/root/neo4j-community-4.4.6/conf/neo4j.conf

# With default configuration Neo4j only accepts local connections.
# To accept non-local connections, uncomment this line:
dbms.default_listen_address=0.0.0.0

# Bolt connector
dbms.connector.bolt.enabled=true
#dbms.connector.bolt.tls_level=DISABLED
dbms.connector.bolt.listen_address=:7687
#dbms.connector.bolt.advertised_address=:7687

# HTTP Connector. There can be zero or one HTTP connectors.
dbms.connector.http.enabled=true
dbms.connector.http.listen_address=:7474
#dbms.connector.http.advertised_address=:7474

# HTTPS Connector. There can be zero or one HTTPS connectors.
dbms.connector.https.enabled=false
#dbms.connector.https.listen_address=:7473
#dbms.connector.https.advertised_address=:7473
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19

启动neo4j

在/root/neo4j-community-4.4.6/bin目录下,输入:

# 后端进程执行
# To run Neo4j in a background process, use:
./neo4j start
or
/root/neo4j-community-4.4.6/bin/neo4j start

# 关闭
./ neo4j stop

# 控制台执行,保持在当前进程
# To run Neo4j as a console application, use:
/root/neo4j-community-4.4.6/bin/neo4j console


  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

浏览器输入:http://ip:7474,将跳转:
,

参考博客:

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/897583
推荐阅读
相关标签
  

闽ICP备14008679号