Install neo4j on server
Go to the official website to download the compressed package and put it on the server. Address isNeo4j Download Center, I chose neo4j 3.5.25 (TAR) here. How to do it? I use the native method here, that is, first download the compressed package to the local computer (win 10 system), and then upload it to the specified location on the CentOS server using PSCP tool, assuming a.
After uploading, go to location a of the compressed package in the server and use the command tar -zxvf neo4j-community-3.5.25-unix.tar to decompress it. After that, use the LS command to see the directory as shown in the following figure:
Follow the command below
- cd neo4j-community-3.5.25
- vim conf/neo4j.conf
Enter the neo4j configuration file, find the location of the following information in the original text, and then modify it to be consistent with the following:
Don’t move the rest, save and exit. Here is a brief explanation of the HTTP column. It is opened because I need to access neo4j, which will be successfully installed on the server in the near future, on my local computer browser. Specifically, it can be accessed by pointing to the domain name or IP address of the server, assuming B, that is, entering B: 7474 in the address column of the local browser. Here we will explain u again that the address 0.0.0.0 represents any host. This is mainly set so that we need to remotely connect to the neo4j process on this server.
Start neo4j service process
First, note that it is in the A / neo4j-community-3.5.25 directory, and then enter. / bin / neo4j start. After execution, I have not encountered any errors in this step, but I do not rule out possible errors.
Close neo4j service process
In the same directory, execute. / bin / neo4j stop to close the service process. But we don’t need this command for the time being. We just need to know that it is turned off like this.
Local browser access neo4j service process
Let me talk about the normal steps first. After typing B: 7474 in the local browser, the following page will appear:
Enter the account and password. The default account and password for the first time are neo4j. After the first successful entry, you will be asked to change the password, and then you can enter the main page, as shown in the following figure;
Successful connection means neo4j has been successfully installed on the server.
Error accessing local browser
- First of all, I can’t enter after typing B: 7474. First of all, the server doesn’t open port 7474. If I want to open port 7474 on the Alibaba cloud server, I need to add a security group in the Alibaba cloud console. Here I have also done one more step of firewall operation, which may be redundant, but I’ll also record it and execute the following commands in sequence:
- firewall-cmd –zone=public –permanent –add-port=7474/tcp
- firewall-cmd –reload
- firewall-cmd –list-ports
The last command is to see if port 7474 has been successfully added
- The second problem is that after entering the account and password, you can’t connect all the time. This is mainly because it uses the port 7687, and it just doesn’t open, which leads to the failure of connecting to the server. The solution is the same as above. Open the port 7687. The method is the same as above. I won’t repeat it here. Just change 7474 to 7687.