We all know that you currently exist, NoSQL Database handlers that are characterized by being very reliable. So, today, I’ll show you one of them and I’m talking about OrientDB. Besides talking about it, I will teach you how to install and configure OrientDB in Ubuntu 18.04.
OrientDB is an open source NoSQL database management system written in Java. One of its main features is that it is not only NoSQL based but also very fast. Especially in large projects where performance is indispensable. It has an enterprise version and a community version for small projects.
So, let’s start to install OrientDB on Ubuntu 18.04.
1. Install Java
OrientDB requires Java 1.7 to work. You probably already have Java installed on your Ubuntu 18.04. However, I will install the Java Oracle version:
:~$ sudo add-apt-repository ppa:webupd8team/java
Now, install Java using this PPA.
:~$ sudo apt update && sudo apt install oracle-java8-installer
During the installation, you will have to accept the license terms.
After that, it is necessary to set this version as the default.
:~$ sudo apt install oracle-java8-set-default
Then, check the Java version.
:~$ java -version
Now, you can continue.
2. Install OrientDB on Ubuntu 18.04
The installation process is quite simple. First, go the the tmp folder to save the file and then proceed to download.
:~$ cd /tmp/ :~$ wget https://s3.us-east-2.amazonaws.com/orientdb3/releases/3.0.12/orientdb-3.0.12.tar.gz
As I write this post, the latest stable version is 3.0.12.
Now, decompress it.
:~$ tar xvf orientdb-3.0.12.tar.gz
Then, move it to the
:~$ sudo mv orientdb-3.0.12 /opt/orientdb
For security reasons, it is advisable to create a new user for OrientDB. On top of that, you have to give it ownership of the folder.
:~$ sudo groupadd -r orientdb :~$ sudo useradd --system -g orientdb orientdb :~$ sudo chown -R orientdb:orientdb /opt/orientdb
And finally, run OrientDB.
:~$ cd /opt/orientdb/bin :~$ sudo ./server.sh
You have to set the root password.
Then you’ll have OrientDB on Ubuntu 18.04.
3. Create a systemd service for OrientDB
In this step, you already have OrientDB installed. The problem is that to start, stop or restart its execution becomes complicated. Therefore, I am going to create a systemd service for OrientDB.
First, copy the OrientDB service file to the systemd folder.
:~$ sudo cp /opt/orientdb/bin/orientdb.service /etc/systemd/system/
Next, edit the OrientDB service file and add the following:
:~$ sudo nano /etc/systemd/system/orientdb.service
[Unit] Description=OrientDB Server After=network.target After=syslog.target [Install] WantedBy=multi-user.target [Service] User=orientdb Group=orientdb ExecStart=/opt/orientdb/bin/server.sh
In order for the service to be taken into account by the system, the systemd service cache must be reloaded.
:~$ sudo systemctl daemon-reload :~$ sudo systemctl start orientdb.service
And that’s it.
4. Test the installation
Now the final step is to complete the installation and verify it. Open your web browser and go to
http://IP_SERVER:2480/studio/index.html and you should see this.
Log in with root user and the password you defined. You will see this.
And go the schema tab.
There are many advantages to using OrientDB as a database manager. Many large companies do this and trust their applications to this new NoSQL database manager.
Please share this article with your friends.