×


Neo4j installation on Ubuntu

Do you need to install Neo4j on Ubuntu 16.04? This article will guide you through the steps to get Neo4j installed on Linux.




As part of our Server Support Services here at Ibmi Media, we regularly help our customers configure their Ubuntu Servers.

It is also great to know how to upgrade Ubuntu version.

More about Neo4j?

Neo4j is a flexible graph database which stores relationships between data records rather than storing data in rows, columns and tables. It is quite robust than traditional database.
In Neo4j, each node is assigned by references to other nodes working with it. This helps to encode complex data relationships.

How to install Neo4j on Ubuntu?

Follow the following steps to install Neo4j on Ubuntu.

i. TO begin, update the server packages with the command below;

sudo apt update


ii. Next, get the prerequisite packages installed with the command below;

sudo apt install apt-transport-https ca-certificates curl software-properties-common


iii. Now add the GPG key to allow Neo4j  to be trusted by the server. This will add it to the server repository list. Use the command below;

curl -fsSL https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -


iv. Now you can add the repository for version Neo4j 4.1  to the server' APT sources with the command below;

sudo add-apt-repository "deb https://debian.neo4j.com stable 4.1"


v. After adding it to the APT sources list, install the Neo4j package which includes all its dependencies with the command;

sudo apt install neo4j -y


vi. After installation, you need to reboot the server. But before that enable Neo4j service with the command below;

sudo systemctl enable neo4j.service


vii. After rebooting the server, test the Neo4j service to confirm that it is working correctly. Use the command below;

sudo systemctl status neo4j.service


How to configure Neo4j  on Ubuntu?

Neo4j must be configured to work with the server. To do this invoke the Cypher-shell utility with the command;

cypher-shell


If it is your first time of using this utility, you will need to enter your Neo4j login information in order to authenticate and communicate with its database. This will establish a connection to the interactive neo4j@neo4j> prompt where you can interact with Neo4j databases. Here you can query and insert nodes.

To exit the cypher-shell prompt, enter exit as shown below and hit enter to exit successfully;

neo4j@neo4j> :exit


Need support in installing packages on Ubuntu? We are available.


Conclusion

See the steps to install and configure Neo4j on Ubuntu.