赞
踩
在Centos8环境下,安装neo4j图形数据库
安装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-*
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
在官网下载社区版压缩包
解压:
tar -axvf neo4j-community-4.4.6-unix.tar.gz
/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
在/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
浏览器输入:http://ip:7474,将跳转:
参考博客:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。