neo4j2.3 - sinherle/Recipes GitHub Wiki
Building Neo4j
Neo4j 2.3 has been successfully built and tested for Linux on z Systems. The following instructions can be used for RHEL 7.2, SLES 12.1 and Ubuntu 16.04.
General Notes: i) When following the steps below, please use a standard permission user unless otherwise specified.
ii) A directory /<source_root>/
will be referred to in these instructions, this is a temporary writeable directory anywhere you'd like to place it.
- Install the Build Dependencies
RHEL 7.2
```
sudo yum install git gcc-c++ make java-1.8.0-openjdk-devel.s390x wget tar graphviz maven rpm git unzip bzip2
```
SLES 12.1
```
sudo zypper install git gcc-c++ make graphviz rpm wget tar unzip bzip2 java-1_8_0-openjdk-devel
```
Ubuntu 16.04
```
sudo apt-get install git gcc g++ make openjdk-8-jdk graphviz maven rpm unzip bzip2 nodejs nodejs-legacy npm devscripts debhelper
```
- Download and Install Node.js (Only for RHEL 7.2 and SLES 12.1)
```
cd <source_root>
git clone https://github.com/andrewlow/node.git
cd node/
./configure
make
sudo make install
```
- Install grunt-cli (Only for SLES 12.1)
```
sudo /usr/local/bin/npm install -g grunt-cli
```
- Download maven binary executable (Only for SLES 12.1)
```
cd <source_root>
wget https://archive.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
tar -zxvf apache-maven-3.0.5-bin.tar.gz
export PATH=<source_root>/apache-maven-3.0.5/bin:$PATH
```
-
Set Enviroment variables
For SLES12 ``` export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=512m" export JAVA_HOME=/usr/lib64/jvm/java export PATH=$JAVA_HOME/bin:$PATH export JVM_ARGS="-Xms1024m -Xmx1024m" export JAVA_OPTS="-Xms128m -Xmx512m"
```
For RHEL7
```
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=512m" export JAVA_HOME=/usr/lib/jvm/java export PATH=$JAVA_HOME/bin:$PATH export JVM_ARGS="-Xms1024m -Xmx1024m" export JAVA_OPTS="-Xms128m -Xmx512m"
```
For UBUNTU 16.04
```
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=512m" export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-s390x export PATH=$JAVA_HOME/bin:$PATH export JVM_ARGS="-Xms1024m -Xmx1024m" export JAVA_OPTS="-Xms128m -Xmx512m" ```
- Download and unzip Neo4j source code
```
cd <source_root>
wget https://github.com/neo4j/neo4j/archive/2.3.zip
unzip 2.3.zip
cd <source_root>/neo4j-2.3
```
-
Build the source
To build individual jar files and execute test cases run the following command
mvn clean install -DskipBrowser -fn
To build without running test cases execute the following
mvn clean install -DskipBrowser -DskipTests -fn
-
Running Neo4j
cd <source_root>/neo4j-2.3/community/server mvn clean compile exec:java
-
Additional Notes
i) If build fails due to the error "Too many open files" try increasing the limit for number of open files.
ulimit -n 4096
ii) Some of the test cases might fail due to time-out. In such a case you will have to increase the timeout and re-run the test case.
For example,
At Line 465 change SEMI_LONG_TIMEOUT_MILLIS to LONG_TIMEOUT_MILLIS in file <source_root>/neo4j2.3/community/io/src/test/java/org/neo4j/io/pagecache/PageCacheTest.java At Line 533 change SHORT_TIMEOUT_MILLIS to LONG_TIMEOUT_MILLIS in file <source_root>/neo4j2.3/community/io/src/test/java/org/neo4j/io/pagecache/PageCacheTest.java
NOTE: After building Neo4j it will be running on
localhost:7474
.