LinuxTutorialsUbuntu

How To Install OrientDB on Ubuntu 16.04

Install OrientDB on Ubuntu 16.04

In this tutorial, we will show you how to install OrientDB on your Ubuntu 16.04. For those of you who didn’t know, OrientDB has a multi-model NoSQL database that supports a document database with a graph it is a java based application and can be run on any operating system which supports multi-master replication and easy horizontal scaling.

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 the step-by-step installation of OrientDB on a Ubuntu 16.04 (xenial xerus) server.

Prerequisites

  • A server running one of the following operating systems: Ubuntu 16.04.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install OrientDB on Ubuntu 16.04 LTS

Step 1. First, make sure that all your system packages are up-to-date by running the following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Dependencies.

First of all, let’s install dependencies for OrientDB:

apt-get install oracle-java8-set-default git ant

Step 3. Installing OrientDB.

Download the latest version of OrientDB by executing the following command, At the moment of writing this article it is version 2.2.22:

wget -O orientdb-community-2.2.22.tar.gz http://orientdb.com/download.php?file=orientdb-community-2.2.22.tar.gz&os=linux

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

tar -zxf orientdb-community-2.2.22.tar.gz
mv orientdb-community-2.2.22 /opt/orientdb

Step 4. Starting the OrientDB Server.

Change to the /opt/orientdb folder and start the OrientDB database server:

cd /opt/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 5. Configure OrientDB Daemon.

Create a system user which we want to run OrientDB here we assume the OrientDB user:

useradd –r 0riendb –s  /sbin/nologin
chown –R orientdb:orientdb /opt/orientdb
nano /opt/orientdb/bin/orientdb.sh

Find the below line in the configuration and change them to:

# You have to SET the OrientDB installation directory here
ORIENTDB_DIR="/opt/orientdb"
ORIENTDB_USER="orientdb"

Once the configuration is done, change the configuration server file’s permission:

chmod 640 /opt/orientdb/config/orientdb-server-config.xml

Step 6. Install the Systemd service OrientDB.

First, we needed to copy the file to /etc/system/services folder:

cp /opt/orientdb/bin/orientdb.service /etc/systemd/system

Edit the OrientDB service file:

### 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

Reload systemd daemon service:

systemctl daemon-reload

Start OrientDB and enable it for starting at boot time:

systemctl start orientdb
systemctl enable orientdb

Congratulations! You have successfully installed OrientDB. Thanks for using this tutorial for installing OrientDB on Ubuntu 16.04 (xenial xerus) server. For additional help or useful information, we recommend you check the official OrientDB website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

Save

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button