In this tutorial, I’ll show you how to install OrientDB on your Ubuntu 20.04|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.
Install and Configure OrientDB on Ubuntu 20.04|18.04
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 20.04|18.04 system to run OrientDB database system. Install it like below:
sudo apt update && sudo apt upgrade
sudo apt install apt-transport-https default-jdk-headless vim bash-completion
Install wget to download OriendDB installation file:
sudo apt-get update
sudo apt-get install wget
Step 2: Install OrientDB on Ubuntu 20.04|18.04 LTS
Once wget is installed, download the archive file. Check Github releases page and replace 3.1.11 with the latest version.
export RELEASE="3.1.11"
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:
+---------------------------------------------------------------+
| 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. |
+---------------------------------------------------------------+
Root password [BLANK=auto generate it]: **************
Please confirm the root password: **************
OrientDB Studio will be available at:
http://server_ip:2480/studio/index.html
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 find /opt/orientdb -name orientdb.service
/opt/orientdb/bin/orientdb.service
Copy the service unit file to /etc/systemd/system/
directory.
sudo cp /opt/orientdb/bin/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
Set data directory permissions:
chown -R orientdb:orientdb /opt/orientdb/
Start orientdb service:
sudo systemctl daemon-reload
sudo systemctl start orientdb
Check the service status:
$ systemctl status orientdb
● orientdb.service - OrientDB Server
Loaded: loaded (/etc/systemd/system/orientdb.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2021-04-28 10:37:54 UTC; 3s ago
Main PID: 1354 (java)
Tasks: 29 (limit: 4683)
Memory: 251.0M
CGroup: /system.slice/orientdb.service
└─1354 /bin/java -server -Xms2G -Xmx2G -Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF8 -Drhino.opt.le>
Apr 28 10:37:57 ubuntu server.sh[1354]: 2021-04-28 10:37:57:847 INFO Installing dynamic plugin 'orientdb-etl-3.1.11.jar'... [OServerPluginManager]
Apr 28 10:37:57 ubuntu server.sh[1354]: 2021-04-28 10:37:57:854 INFO Installing dynamic plugin 'orientdb-teleporter-3.1.11.jar'... [OServerPluginManager]
Apr 28 10:37:57 ubuntu server.sh[1354]: 2021-04-28 10:37:57:862 INFO Installing dynamic plugin 'orientdb-neo4j-importer-plugin-3.1.11-dist.jar'... [OServerPlugi>
Apr 28 10:37:57 ubuntu server.sh[1354]: 2021-04-28 10:37:57:866 INFO Installing dynamic plugin 'orientdb-studio-3.1.11.zip'... [OServerPluginManager]
Apr 28 10:37:57 ubuntu server.sh[1354]: 2021-04-28 10:37:57:870 INFO ODefaultPasswordAuthenticator is active [ODefaultPasswordAuthenticator]
Apr 28 10:37:57 ubuntu server.sh[1354]: 2021-04-28 10:37:57:871 INFO OServerConfigAuthenticator is active [OServerConfigAuthenticator]
Apr 28 10:37:57 ubuntu server.sh[1354]: 2021-04-28 10:37:57:873 INFO OSystemUserAuthenticator is active [OSystemUserAuthenticator]
Apr 28 10:37:57 ubuntu server.sh[1354]: 2021-04-28 10:37:57:874 INFO [OVariableParser.resolveVariables] Property not found: distributed [orientechnologies]
Apr 28 10:37:57 ubuntu server.sh[1354]: 2021-04-28 10:37:57:880 WARNI Authenticated clients can execute any kind of code into the server by using the following a>
Apr 28 10:37:57 ubuntu server.sh[1354]: 2021-04-28 10:37:57:884 INFO OrientDB Studio available at http://165.227.194.171:2480/studio/index.html [OServer]
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 20.04|18.04 Linux systems.