29 C
Texas
angeloma
Senior Writer and partner

How to Install and configure OrientDB on Ubuntu 18.04?

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:

- Advertisement -
:~$ sudo add-apt-repository ppa:webupd8team/java

1.- Add the repository
1.- Add the repository

Now, install Java using this PPA.

:~$ sudo apt update && sudo apt install oracle-java8-installer

2.- Install Oracle Java
2.- Install Oracle Java

During the installation, you will have to accept the license terms.

3.- License agreement
3.- License agreement

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

4.- Check the Java version
4.- Check the 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

5.- Download OrientDB on Ubuntu 18.04
5.- Download OrientDB on Ubuntu 18.04

As I write this post, the latest stable version is 3.0.12.

Now, decompress it.

:~$ tar xvf orientdb-3.0.12.tar.gz

6.- Decompressing the file
6.- Decompressing the file

Then, move it to the /opt folder.

:~$ sudo mv orientdb-3.0.12 /opt/orientdb

7.- moving and renaming the orientdb folder
7.- moving and renaming the orientdb folder

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

8.- Create a new user for orientdb
8.- Create a new user for orientdb

And finally, run OrientDB.

:~$ cd /opt/orientdb/bin
:~$ sudo ./server.sh

9.- Runnning OrientDB
9.- Runnning OrientDB

You have to set the root password.

10.- Setting a root password for OrientDB
10.- Setting a root password for OrientDB

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

11.- Creating a systemd service for OrientDB
11.- Creating a systemd service for OrientDB

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.

12.- Log in screen
12.- Log in screen

Log in with root user and the password you defined. You will see this.

13.- OrientDB main screen
13.- OrientDB main screen

And go the schema tab.

14.- Schema tab
14.- Schema tab

Conclusion

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.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article