Are you trying to install neo4j on Ubuntu? Here’s how we do it.
Here at Bobcares, we have seen several such Ubuntu related queries as part of our Server Management Services for web hosts and online service providers.
Today we’ll take a look at how to upgrade the Ubuntu version.
Know more about Neo4j
Neo4j is a graph database. Rather than storing the data in rows, columns, and tables like a traditional database, it stored relationships between data records. That’s why Neo4j is highly flexible.
Each node stores references to all other nodes that is connected to. So Neo4j can encode any complex relationships with minimal overhead.
How we install Neo4j on Ubuntu
Here are the steps our Support Engineers follow to install neo4j.
1. As a first step, we update the existing list of packages:
sudo apt update
2. Next, we install some prerequisite packages. Your system might already have these packages. But it is safe to run this command.
sudo apt install apt-transport-https ca-certificates curl software-properties-common
3. Now we add the GPG key that will ensure that you can trust Neo4j packages that are installed from the upstream repository.
curl -fsSL https://debian.neo4j.com/neotechnology.gpg.key | sudo apt-key add -
4. Then add the Neo4j 4.1 repository to the system’s APT sources:
sudo add-apt-repository "deb https://debian.neo4j.com stable 4.1"
5. Now install the Neo4j package and all of its dependencies. This will also install a compatible Java package. You just need to enter Y when you are prompted for confirmation.
sudo apt install neo4j
6. Once the installation complete, Neo4j starts running. But it is not set to start on a reboot on the system. So make sure to enable it as a service.
sudo systemctl enable neo4j.service
7. Finally, check the Neo4j status by running the below command.
sudo systemctl status neo4j.service
Connecting and Configuring Neo4j on Ubuntu
After installing and configuring Neo4j to run after any reboot, we can now test connecting to the database.
In order to interact with Neo4j on the command line, invoke the cypher-shell utility as below:
cypher-shell
When invoking the utility for the first time, you can log in using the default credentials neo4j user and neo4j password. Once the authentication completes, you will be prompted to change the password.
Change your password. After changing it, you will be connected to the interactive neo4j@neo4j>
prompt where you can interact with Neo4j databases by inserting and querying nodes.
To exit from cypher-shell prompt, type exit as shown below and hit enter.
neo4j@neo4j> :exit
[Need any further assistance with Ubuntu queries? – We are here to help you.]
Conclusion
In today’s witeup, we saw how our Support Engineers install and configure Neo4j in Ubuntu.
0 Comments