最近需要在linux vm上部署neo4j,写了了个安装文档 直接copy过来了
- download the community sever.
Neo4j Download Center - Neo4j Graph Data Platform - upload the tar.gz to Linux VM, then use [tar -xf [file path]] to decompress.
- modify the file <neo4j_home>/conf/neo4j.conf
- uncomment those lines:
-
- first line's port use to connect neo4j sever, such as : some application yml will config this port
- second line use to config the port that neo4j management center browser
- first line's port use to connect neo4j sever, such as : some application yml will config this port
-
- uncomment those lines:
-
Place the extracted files in a permanent home on your server. The top level directory is referred to as NEO4J_HOME.
-
To run Neo4j as a console application, use:
<NEO4J_HOME>/bin/neo4j console
. -
To run Neo4j in a background process, use:
<NEO4J_HOME>/bin/neo4j start
.
-
-
Visit http://<VM_IP>:7474 in your web browser.
-
Connect using the username 'neo4j' with default password 'neo4j'. You’ll then be prompted to change the password.
Create as service
- create neo4j.service where in /usr/lib/systemd/system
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[Unit]
Description=Neo4j-instanceA
[Service]
Type=forking
User=root
LimitNOFILE=60000
ExecStart=
/usr/bin/env
<NEO4J_HOME>
/bin/neo4j
start
ExecReload=
/usr/bin/env
<NEO4J_HOME>
/bin/neo4j
restart
ExecStop=
/usr/bin/env
<NEO4J_HOME>
/bin/neo4j
stop
[Install]
WantedBy=multi-user.target
- run [sudo vi /etc/systemd/user.conf]
- Uncomment and define the value of DefaultLimitNOFILE, found in the [Manager] section
-
put DefaultLimitNOFILE value as 60000
[Manager]
...
DefaultLimitNOFILE=60000
- run [sudo vi /etc/security/limits.conf]
-
Define the following values
neo4j soft nofile 60000
neo4j hard nofile 60000
-
- run [sudo systemctl daemon-reload]
- run [sudo systemctl enable neo4j]
- START: sudo systemctl start neo4j
- STOP: sudo systemctl stop neo4j
- RESTART: sudo systemctl restart neo4j
Refer:https://neo4j.com/docs/operations-manual/current/installation/linux/tarball/