linux开放7474端口,NEO4J安装指南Linux篇,neo4j安装指南
NEO4J安装指南Linux篇,neo4j安装指南
NEO4J安装指南Linux篇
NEO4J安装指南Linux篇
1.JAVA环境——neo4j要求JDK8
查看Java版本
[root@tac software]# java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
You have new mail in /var/spool/mail/root
[root@tac software]#
2.创建一个用户neo4j,用来管理Neo4j 。当然这不是必须的。也可以是其它账号或root账号。
[root@tac neo4j-community-3.3.6]# groupadd nosql
[root@tac neo4j-community-3.3.6]# useradd -G nosql neo4j
3.解压
[root@tac ~]# tar -zxvf neo4j-community-3.3.6-unix.tar.gz -C /usr/local
4.修改环境变量
[root@tac neo4j-community-3.3.6]# vi /etc/profile
export NEO4J_HOME=/usr/local/neo4j/neo4j-community-3.3.6
export PATH=$PATH:$NEO4J_HOME/bin
保存退出后执行更改
[root@tac neo4j-community-3.3.6]# source /etc/profile
5.修改配置文件/etc/security/limits.conf
[root@tac neo4j-community-3.3.6]# vim /etc/security/limits.conf
neo4j soft nofile 40000
neo4j hard nofile 40000
6.验证
[root@tac neo4j-community-3.3.6]# neo4j version
neo4j 3.3.6
[root@tac neo4j-community-3.3.6]# neo4j
Usage: neo4j { console | start | stop | restart | status | version }
7.配置neo4j
创建数据库目录
[root@tac neo4j-community-3.3.6]# mkdir /usr/local/neo4j/data
修改配置文件
[root@tac neo4j-community-3.3.6]# vi neo4j-community-3.3.6/conf/neo4j.conf
指定数据库目录位置
dbms.active_database=/usr/local/neo4j/data/graph.db
dbms.directories.import=import
dbms.memory.heap.initial_size=512m
dbms.memory.heap.max_size=512m
指定运行的主机
dbms.connectors.default_listen_address=0.0.0.0
##或者本机IP
dbms.connectors.default_advertised_address=0.0.0.0
##或者本机IP
dbms.connector.bolt.enabled=true
dbms.connector.bolt.tls_level=OPTIONAL
dbms.connector.bolt.listen_address=:7687
dbms.connector.http.enabled=true
dbms.connector.http.listen_address=:7474
dbms.connector.https.enabled=true
dbms.connector.https.listen_address=:7473
dbms.tx_log.rotation.retention_policy=1 days
dbms.jvm.additional=-XX:+UseG1GC
dbms.jvm.additional=-XX:-OmitStackTraceInFastThrow
dbms.jvm.additional=-XX:+AlwaysPreTouch
dbms.jvm.additional=-XX:+UnlockExperimentalVMOptions
dbms.jvm.additional=-XX:+TrustFinalNonStaticFields
dbms.jvm.additional=-XX:+DisableExplicitGC
dbms.jvm.additional=-Djdk.tls.ephemeralDHKeySize=2048
dbms.jvm.additional=-Djdk.tls.rejectClientInitiatedRenegotiation=true
dbms.windows_service_name=neo4j
dbms.jvm.additional=-Dunsupported.dbms.udc.source=tarball
8.开放7474、7687、7473端口
使用iptables开放如下端口
[root@tac neo4j-community-3.3.6]# /sbin/iptables -I INPUT -p tcp --dport 7474 -j ACCEPT
[root@tac neo4j-community-3.3.6]# /sbin/iptables -I INPUT -p tcp --dport 7687 -j ACCEPT
[root@tac neo4j-community-3.3.6]# /sbin/iptables -I INPUT -p tcp --dport 7473 -j ACCEPT
保存
[root@tac neo4j-community-3.3.6]# /etc/rc.d/init.d/iptables save
重启服务
[root@tac neo4j-community-3.3.6]# service iptables restart
9.启动
[root@tac neo4j-community-3.3.6]# neo4j start
Active database: /usr/local/neo4j/data/graph.db
Directories in use: home: /usr/local/neo4j/neo4j-community-3.3.6
config: /usr/local/neo4j/neo4j-community-3.3.6/conf
logs: /usr/local/neo4j/neo4j-community-3.3.6/logs
plugins: /usr/local/neo4j/neo4j-community-3.3.6/plugins
import: /usr/local/neo4j/neo4j-community-3.3.6/import
data: /usr/local/neo4j/neo4j-community-3.3.6/data
certificates: /usr/local/neo4j/neo4j-community-3.3.6/certificates
run: /usr/local/neo4j/neo4j-community-3.3.6/run
Starting Neo4j.
Started neo4j (pid 6793). It is available at http://192.168.10.174:7474/
There may be a short delay until the server is ready.
See /usr/local/neo4j/neo4j-community-3.3.6/logs/neo4j.log for current status.
相关文章暂无相关文章