You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

In this tutorial, I’ll show you how to install OrientDB on your Ubuntu 18.04 server. OrientDB is the world’s leading open source NoSQL multi-model database management system written in Java. It is the most versatile DBMS which supports Graph, Document, Reactive, Full-Text, Geospatial and Key-Value models in one Multi-Model product.

You can run OrientDB in a distributed (Multi-Master) setup and supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries. To know the power of OrientDB, take a look at OrientDB vs MongoDB for Document Databases and OrientDB vs Neo4j to have a comparison with a popular Graph Database.

How To Install and Configure OrientDB on Ubuntu 18.04 LTS

In this guide, we will install OrientDB Community Edition which is available as a binary package for download. Open OrientDB downloads page.

Step 1: Install OrientDB Dependencies.

Java is needed on your Ubuntu 18.04 system to run OrientDB database system. Install it like below:

sudo apt update && sudo apt upgrade
sudo apt install apt-transport-https  openjdk-8-jre-headless

Install wget to download OriendDB installation file:

sudo apt-get update
sudo apt-get install wget

Step 2: Install OrientDB on Ubuntu 18.04 LTS

Once wget is installed, download the archive file. Check Github releases page and replace 3.0.5 with the latest version.

export RELEASE="3.0.4"
wget https://s3.us-east-2.amazonaws.com/orientdb3/releases/${RELEASE}/orientdb-${RELEASE}.tar.gz

Uncompress the file:

tar xvf orientdb-${RELEASE}.tar.gz

Move the resulting directory to /opt/orientdb

sudo mv  orientdb-${RELEASE} /opt/orientdb

Add system user to manage orientdb:

sudo groupadd -r orientdb
sudo useradd --system -g orientdb orientdb
sudo chown -R orientdb:orientdb /opt/orientdb

Create a root password:

cd /opt/orientdb/bin/
sudo ./server.sh

Sample output:

[pastacode lang=”bash” manual=”%2B—————————————————————%2B%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20WARNING%3A%20FIRST%20RUN%20CONFIGURATION%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%0A%2B—————————————————————%2B%0A%7C%20This%20is%20the%20first%20time%20the%20server%20is%20running.%20Please%20type%20a%20%20%20%7C%0A%7C%20password%20of%20your%20choice%20for%20the%20’root’%20user%20or%20leave%20it%20blank%20%7C%0A%7C%20to%20auto-generate%20it.%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%0A%7C%20To%20avoid%20this%20message%20set%20the%20environment%20variable%20or%20JVM%20%20%20%20%20%7C%0A%7C%20setting%20ORIENTDB_ROOT_PASSWORD%20to%20the%20root%20password%20to%20use.%20%20%20%7C%0A%2B—————————————————————%2B%0A%0ARoot%20password%20%5BBLANK%3Dauto%20generate%20it%5D%3A%20**************%0APlease%20confirm%20the%20root%20password%3A%20**************%0A%0A” message=”” highlight=”” provider=”manual”/]

Step 3: Configure the OrientDB systemd service

The OrientDB’s package contains a service descriptor file for systemd based distros. The orientdb.service is placed in the bin directory. You can use locate command to find this fule path:

$ sudo locate orientdb.service
/opt/orientdb/bin/orientdb.service

Copy the service unit file to  /etc/systemd/system/ directory.

sudo cp /opt/orientdb/server/script/orientdb.service /etc/systemd/system/

Edit the file to set user and group for running the application.

sudo vim /etc/systemd/system/orientdb.service

It should look like below:

# Copyright (c) OrientDB LTD (http://http://orientdb.com/)
#
[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

Start orientdb service:

sudo systemctl daemon-reload
sudo systemctl start orientdb

Your orientdb service should now be running. Open the UI using:

http://server:2480/studio/index.html

Login with the username root and password configured earlier.

Thank you for using our guide to install OrientDB on Ubuntu 18.04 LTS.

You can support us by downloading this article as PDF from the Link below. Download the guide as PDF