Environmental dependence
Running neo4j requires a java environment. Different neo4j versions have different requirements for the java environment. You can install the corresponding java version according to the error prompt after installing neo4j.
Install and run
Method 1 Download from the official website
https://neo4j.com/download-center/ The
official website download can only download 4.x and 3.x, if you want to download the lower version, you can only use curl or other ways.
Method 2 Directly on the server curl command download
curl -O http://dist.neo4j.org/neo4j-community-3.4.5-unix.tar.gz
I need a version between 1.5 and 2.1 here, and I just wrote a version 1.8.2
curl -O http://dist.neo4j.org/neo4j-community-1.8.2-unix.tar.gz
download successful
Unzip
tar -zxvf neo4j-community-1.8.2-unix.tar.gz
A neo4j-community-1.8.2 folder is generated locally,
switch to the neo4j root directory
cd neo4j-community-1.8.2
bin/./neo4j start
Visit http://localhost:7474
Environment variable configuration
By adding neo4j to the PATH, we can directly use neo4j without switching to the corresponding directory. Environment variables are not necessary, just for our convenience.
Assume that it is now in the root directory of the neo4j we installed
sudo mkdir /usr/local/neo4j
cd ../
sudo mv neo4j-community-1.8.2 /usr/local/neo4j
sudo vim ~/.bashrc
export NEO4J_HOME=/usr/local/neo4j/neo4j-community-1.8.2
export PATH=$PATH:$NEO4J_HOME/bin
source ~/.bashrc
At this time, the environment variables are configured successfully
start up
neo4j start