How To Install OrientDB on CentOS 7

OrientDB has a multi-model NoSQL database which supports document database with a graph which is a java based application and can be run on any operating system which supports multi-master replication and easy horizontal scaling.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing OrientDB.

Step 3. Starting the OrientDB Server.

Step 4. Configure OrientDB Daemon.

 

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation OrientDB open source NoSQL database management system on a CentOS 7 server.
Install OrientDB on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Installing OrientDB.

First of all, create a new user to run OrientDB:

adduser orientdb -d /opt/orientdb

Now you can download the OrientDB binary archive by running the following command:

cd /opt/orientdb/
wget https://orientdb.com/download.php?file=orientdb-community-importers-2.2.29.tar.gz -O /opt/orientdb/orientdb.tar.gz

Once the package is downloaded we will untar and move the extracted folder to the /opt/orientdb:

tar -xf orientdb.tar.gz
mv orientdb-community*/* .

Make the orientdb user the owner of the extracted files:

chown -R orientdb:orientdb /opt/orientdb

Step 3. Starting the OrientDB Server.

OrientDB provides an installer script for you to start the server. Switch to the OrientDB user:

su - orientdb
sudo bin/server.sh

OrientDB should now prompt for the root password with a message like the one below:

+---------------------------------------------------------------+
|                WARNING: FIRST RUN CONFIGURATION               |
+---------------------------------------------------------------+
| This is the first time the server is running. Please type a   |
| password of your choice for the 'root' user or leave it blank |
| to auto-generate it.                                          |
|                                                               |
| To avoid this message set the environment variable or JVM     |
| setting ORIENTDB_ROOT_PASSWORD to the root password to use.   |
+---------------------------------------------------------------+

Step 4. Configure OrientDB Daemon.

Create a new ststemd service to easily manage OrientDB start and stop:

nano /etc/systemd/system/orientdb.service

Paste the following content:

[Unit]
Description=OrientDB service
After=network.target

[Service]
Type=simple
ExecStart=/opt/orientdb/bin/server.sh
User=orientdb
Group=orientdb
Restart=always
RestartSec=9
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=orientdb

[Install]
WantedBy=multi-user.target

Reload systemd daemon service:

systemctl daemon-reload

Start OrientDB and enable for starting at boot time:

systemctl start orientdb
systemctl enable orientdb

Congratulation’s! You have successfully installed OrientDB. Thanks for using this tutorial for installing OrientDB open source NoSQL database management on your CentOS 7 system. For additional help or useful information, we recommend you to check the official OrientDB web site.

Leave a Reply