How to install Neo4J Database on Linux Mint 18.3

To install Neo4J Database on Linux Mint 18.3

Neo4J is known to be the #1 Graph-based platform to store and query connected data. Neo4J is possibly a very good solution for storing and querying this kind of data. Connected data is a form of data which can be best defined in the form of relationships. This tutorial covers the method to install Neo4J Database on Linux Mint 18.3.

Installing Neo4J Database

In order to install Neo4J Database, you need to have Java installed on your system. Run the following command for the same process.

linuxhelp ~ # add-apt-reposi tory ppa:webupd8team/java
You are about to add the following PPA:
 Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK7 / JDK8 / JDK9). There are no actual Java files in this PPA.

Important ->  Why Oracle Java 7 And 6 Installers No Longer Work: http://www.webupd8.org/2017/06/why-oracle-java-7-and-6-installers-no.html

Ubuntu 16.10 Yakkety Yak is no longer supported by Canonical (and thus, Launchpad and this PPA). The PPA supports Ubuntu 17.10, 17.04, 16.04, 14.04 and 12.04.

More info (and Ubuntu installation instructions):
- for Oracle Java 7: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
- for Oracle Java 8: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
.
.
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpg: key EEA14886: public key " Launchpad VLC"  imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)


Once the installation is complete, make sure you update the system by making use of the following command.

linuxhelp ~ # apt-get update 
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease [17.5 kB]                                                         
Hit:3 http://archive.canonical.com/ubuntu xenial InRelease                                                           
Ign:4 http://packages.linuxmint.com sylvia InRelease                                                                 
Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]                                                                     
Get:6 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main Sources [1,408 B]                 
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]                         
.
.
Get:28 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [4,836 B]                                                         
Get:29 http://archive.ubuntu.com/ubuntu xenial-backports/main i386 Packages [4,840 B]                                                          
Get:30 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [6,628 B]                                                     
Get:31 http://archive.ubuntu.com/ubuntu xenial-backports/universe i386 Packages [6,620 B]                                                      
Fetched 5,054 kB in 11s (432 kB/s)                                                                                                             
Reading package lists... Done


And then, install oracle-java8-installer by making use of the following command.

linuxhelp ~ # apt-get install oracle-java8-installer 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  visualvm ttf-baekmuk | ttf-unfonts | ttf-unfonts-core ttf-kochi-gothic | ttf-sazanami-gothic ttf-kochi-mincho | ttf-sazanami-mincho
  ttf-arphic-uming
Recommended packages:
  gsfonts-x11 oracle-java8-set-d  efault
The following NEW packages will be installed:
  oracle-java8-installer
0 upgraded, 1 newly installed, 0 to remove and 214 not upgraded.
Need to get 33.1 kB of archives.
After this operation, 118 kB of additional disk space will be used.
.
.
.
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/wsgen to provide /usr/bin/wsgen (wsgen) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/wsimport to provide /usr/bin/wsimport (wsimport) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-oracle/bin/xjc to provide /usr/bin/xjc (xjc) in auto mode
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so to provide /usr/lib/mozilla/plugins/libjavaplugin.so (mozilla-javaplugin.so) in auto mode


Oracle JDK 8 installed and in order to set it as default, make use of the following command.

linuxhelp ~ # apt install oracle-java8-set-default 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  oracle-java8-set-default
0 upgraded, 1 newly installed, 0 to remove and 214 not upgraded.
Need to get 6,830 B of archives.
After this operation, 20.5 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main amd64 oracle-java8-set-default all 8u161-1~webupd8~0 [6,830 B]
Fetched 6,830 B in 0s (15.6 kB/s)             
Selecting previously unselected package oracle-java8-set-default.
(Reading database ... 223917 files and directories currently installed.)
Preparing to unpack .../oracle-java8-set-default_8u161-1~webupd8~0_all.deb ...
Unpacking oracle-java8-set-default (8u161-1~webupd8~0) ...
Setting up oracle-java8-set-default (8u161-1~webupd8~0) ...

Now, you shall proceed with the process to install Neo4J, but before that, you need to add the apt package manager as follows.

linuxhelp ~ # wget -O - http://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -
--2018-02-19 18:16:13--  http://debian.neo4j.org/neotechnology.gpg.key
Resolving debian.neo4j.org (debian.neo4j.org)... 52.0.233.188
Connecting to debian.neo4j.org (debian.neo4j.org)|52.0.233.188|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4791 (4.7K) [application/octet-stream]
Saving to: ‘ STDOUT’ 

-                                   100%[===================================================================> ]   4.68K  --.-KB/s    in 0s      

2018-02-19 18:16:14 (184 MB/s) - written to stdout [4791/4791]

OK
linuxhelp ~ # echo ' deb http://debian.neo4j.org/repo stable/'  >  /etc/apt/sources.list.d/neo4j.list

It has now been added.


Once it is done, you need to update it as follows.

linuxhelp ~ # apt-get update 
Hit:1 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease                                                         
Hit:3 http://archive.canonical.com/ubuntu xenial InRelease                                                      
Hit:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease                                                      
Ign:5 http://packages.linuxmint.com sylvia InRelease                                                                
Ign:6 http://debian.neo4j.org/repo stable/ InRelease                                                                
Hit:7 http://security.ubuntu.com/ubuntu xenial-security InRelease                             
Hit:8 http://archive.ubuntu.com/ubuntu xenial-backports InRelease                              
Hit:9 http://packages.linuxmint.com sylvia Release                                             
Get:10 http://debian.neo4j.org/repo stable/ Release [1,479 B]           
Get:12 http://debian.neo4j.org/repo stable/ Release.gpg [819 B]
Get:13 http://debian.neo4j.org/repo stable/ Packages [38.5 kB]
Fetched 40.8 kB in 1s (20.5 kB/s)    
Reading package lists... Done

And, trigger the installation process by executing the following command.

linuxhelp ~ # apt-get install neo4j
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  cypher-shell daemon
The following NEW packages will be installed:
  cypher-shell daemon neo4j
0 upgraded, 3 newly installed, 0 to remove and 214 not upgraded.
Need to get 87.5 MB of archives.
After this operation, 102 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial/universe amd64 daemon amd64 0.6.4-1 [98.2 kB]
Get:2 http://debian.neo4j.org/repo stable/ cypher-shell 1.1.2-1 [710 kB]
Get:3 http://debian.neo4j.org/repo stable/ neo4j 3.3.3 [86.7 MB]
Fetched 87.5 MB in 2min 26s (599 kB/s)                                            
.
.
.
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up daemon (0.6.4-1) ...
Setting up cypher-shell (1.1.2-1) ...
Setting up neo4j (3.3.3) ...
Processing triggers for systemd (229-4ubuntu21) ...
Processing triggers for ureadahead (0.100.0-19) ...

Once it is installed, you need to check its status by making use of the following command.

linuxhelp ~ # service neo4j status
● neo4j.service - Neo4j Graph Database
   Loaded: loaded (/lib/systemd/system/neo4j.service  disabled  vendor preset: enabled)
   Active: inactive (dead)

And then, start the service by making use of the following command.

linuxhelp ~ # systemctl start neo4j.service

Again check the status of your currently installed Neo4J by making use of the following command.

linuxhelp ~ # service neo4j status
● neo4j.service - Neo4j Graph Database
   Loaded: loaded (/lib/systemd/system/neo4j.service  disabled  vendor preset: enabled)
   Active: active (running) since Mon 2018-02-19 18:22:03 IST  6s ago
 Main PID: 7697 (java)
   CGroup: /system.slice/neo4j.service
           └─7697 /usr/bin/java -cp /var/lib/neo4j/plugins:/etc/neo4j:/usr/share/neo4j/lib/*:/var/lib/neo4j/plugins/* -server -XX:+UseG1GC -XX:-
.
.
Feb 19 18:22:05 linuxhelp neo4j[7697]: 2018-02-19 12:52:05.624+0000 INFO  Starting...
Feb 19 18:22:09 linuxhelp neo4j[7697]: 2018-02-19 12:52:09.204+0000 INFO  Bolt enabled on 127.0.0.1:7687.

Once it is done, you need to Neo4J service, it starts at its default port, which 7687. Once it starts, we can even visit the Neo4J panel in a browser like this:


You can visit this panel at this URL: http://localhost:7474/browser/
Log in using the default Neo4j password ‘ neo4j’ and then you will be prompted to set a new password.

With this, the installation of Neo4J Database on Linux Mint 18.3 comes to an end.

FAQ
Q
What’s the best option for startups that need to use Neo4j Enterprise?
A
We have a great program to help you up your game. Our Startup Program has two levels designed to suit the full range: from individuals and bootstrapped startups in a garage to later stage startups with venture funding.
Q
I’m an educator interested in including Neo4j in my curriculum; is that allowed?
A
Absolutely, that’s great to hear. You have two options: Neo4j Community Edition, and Neo4j Enterprise Edition under an Education License. We also have lots of learning material which we are happy to share. Contact us and we’ll be happy to help you get started.
Q
Wanna I need official site link for this?
A
refer this link as follow " https://neo4j.com/".
Q
I’m a student learning Neo4j. Which license is right for me?
A
The Neo4j Desktop with the Developer License is the best way to learn and build sample applications with Cypher, the graph query language.
Q
I want to include Neo4j in software that I’m shipping. What are my options?
A
Neo4j offers a mature OEM program tailored to your needs.