Linux Installation Instructions - DeepPhe/DeepPhe-Release GitHub Wiki

These instruction assume that you have some familiarity with your chosen distribution of Linux. These instructions are written using the example Linux distribution Debian/Ubuntu, however that is not a requirement. Any popular Linux distribution should be compatible with DeepPhe.

Install Java 1.8

  1. Determine the installed Java versions:
sudo update-alternatives --config java

You should see a display like the following:

There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
   1           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.14.1.1-1.el7_9.x86_64/bin/java)
*+ 2           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/bin/java)
   3           java-1.7.0-openjdk.x86_64 (/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.261-2.6.22.2.el7_8.x86_64/jre/bin/java)
  1. If you see java-1.8.0-openjdk.x86_64 or any other java-1.8 variant listed, press the corresponding number to set that as your global Java version.

  2. If you do not see a Java 1.8 variant listed, you must install it:

sudo apt-get update
sudo apt-get install openjdk-8-jdk
  1. Repeat step 1 and 2 from this section to set Java 1.8 as your global Java version.

Install Apache Maven

  1. Maven is available as a package on most linux systems. On Debian/Ubuntu system, you can install it using the following commands:
sudo apt-get update
sudo apt-get install maven
  1. Close your exiting terminal window and open a new one.

  2. Check to see that Maven is using Java 1.8:

mvn -v

You will see output similar to this:

Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
Maven home: /opt/maven
Java version: 1.8.0_322, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1160.59.1.el7.x86_64", arch: "amd64", family: "unix"

The Java version is on line 3.

Install Neo4j

  1. Download neo4j-community-3.5.12-unix.tar.gz:
wget https://github.com/DeepPhe/DeepPhe-Dist/releases/download/main/neo4j-community-3.5.12-unix.tar.gz
  1. Extract to a directory (e.g., /opt):
tar xvf neo4j-community-3.5.12-unix.tar.gz -C /opt

The above command will extract the neo4j software to the /opt/neo4j-community-3.5.12.
Important: Whichever directory you choose, you will need to remember in order to set your NEO4J_HOME later.

  1. Change to the bin directory of Neo4j:
cd /opt/neo4j-community-3.5.12/bin
  1. Set the initial Neo4j password to "neo4jpass":
./neo4j-admin set-initial-password neo4jpass

Download the DeepPhe-Release

  1. Download the latest DeepPhe release source code:
wget https://github.com/DeepPhe/DeepPhe-Release/archive/refs/tags/xn0.5.9.tar.gz
  1. Extract to a directory (e.g., /opt):
tar xvf xn0.5.9.tar.gz -C /opt
  1. This will create a directory called DeepPhe-Release-xn0.5.9 in whichever directory you specified.

Prepare the DeepPhe example files

  1. Download the DeepPhe example files:
cd ~
wget https://github.com/DeepPhe/dphe-examples/archive/refs/tags/v20210827.tar.gz
  1. Extract the Example Files to a directory where you can keep documents, e.g., a docs folder in your home directory:
cd ~
mkdir docs
tar xvf v20210827.tar.gz -C docs
  1. Rename the example file folder to something a little nicer:
mv ~/docs/dphe-examples-20210827 ~/docs/dphe-examples

Build DeepPhe

  1. Go to the DeepPhe folder and change to the DeepPhe-Release-xn0.5.9/scripts/unix folder:
cd /opt/DeepPhe-Release-xn0.5.9/scripts/unix
  1. Make the scripts in that folder executable:
sudo chmod u+x *
  1. Run the build.sh script:
./build.sh

Create the installer.conf file where we will set NEO4J_HOME and JAVA_HOME

  1. Make sure you are still in the /opt/DeepPhe-Release-xn0.5.9/scripts/unix directory.

  2. Determine the installation directory of Java 1.8:

sudo update-alternatives --config java

Press enter to not make any changes.

  1. Copy the path to the Java 1.8 installation, ignoring the /jre/bin/java suffix. This is your JAVA_HOME.

For Example:

  • Incorrect: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/bin/java

  • Correct: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64

  1. Recall your NEO4J_HOME from the "Install Neo4j" section.

  2. Create a file named installer.conf that specifies your NEO4J_HOME and JAVA_HOME location by running the following command, replacing path_to_neo4j_home and path_to_java_home with their respective locations:

Example:

cd /opt/DeepPhe-Release-xn0.5.9/scripts/unix
printf 'NEO4J_HOME=/opt/neo4j-community-3.5.12\nJAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64\n' > installer.conf
  1. verify the file looks correct. It should look roughly like this:
NEO4J_HOME=/opt/neo4j-community-3.5.12
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64

Copy DeepPhe Neo4j plugin and database to the Neo4j directory

Note: When you run the reset-db.sh script the neo4j server must be stopped.
Neo4j will not recognize new procedures in the plugin if the plugin is copied while neo4j is running.

  1. In the scripts/unix directory, run reset-db.sh:
cd /opt/DeepPhe-Release-xn0.5.9/scripts/unix
./reset-db.sh

The reset-db script copies the DeepPhe Neo4j Plugin and DeepPhe database into the proper directories.

The output should look as follows:

Copying a clean database from
	../../dphe-onto-db/src/main/resources/graph/neo4j/ontology.db
   to
	/opt/neo4j-community-3.5.12/data/databases
  Success!

Copying dphe-neo4j-plugin from
	../../dphe-neo4j-plugin/target/deepphe-neo4j-plugin-0.5.0.jar
   to
	/opt/neo4j-community-3.5.12/plugins
  Success!

Run DeepPhe for the first time

  1. Run DeepPhe, passing the example reports as the only parameters:
cd /opt/DeepPhe-Release-xn0.5.9/scripts/unix
./run.sh ~docs/dphe-examples/reports