Installing and Configuring OrientDB on Ubuntu 16.04

  • Supports horizontal scaling, fault tolerance, clustering and sharding.
  • Can be up and running quickly.
  • Supports HTTP, RESTful protocol, and JSON additional libraries.
  • Provide an extensible framework for adding external authenticators and password validation.
  • Support database encryption to prevent unauthorized users from accessing database content.
  • Allows to import relational database into OrientDB.

Prerequisites

  • A fresh Alibaba Cloud ECS instance with Ubuntu 16.04 server installed.
  • A static IP address 192.168.0.103 is configured on the instance
  • A Root password is setup on the instance.

Launch Alibaba Cloud ECS Instance

First, log in to your https://ecs.console.aliyun.com">Alibaba Cloud ECS Console. Create a new ECS instance, choosing Ubuntu 16.04 as the operating system with at least 2GB RAM. Connect to your ECS instance and log in as the root user.

apt-get update -y

Install Java

OrientDB is written in Java. So you will need to install Java to your system. You can install it using the following command:

apt-get install default-jre -y
java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

Install OrientDB

First, you will need to download the latest version of the OrientDB community edition from their official website. You can download it using the following command:

wget https://s3.us-east-2.amazonaws.com/orientdb3/releases/3.0.1/orientdb-3.0.1.tar.gz
tar -xvzf orientdb-3.0.1.tar.gz
cp -r orientdb-3.0.1 /opt/orientdb
/opt/orientdb/bin/server.sh
+---------------------------------------------------------------+
| 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: **********
2018-06-02 09:48:01:860 INFO Installing dynamic plugin 'orientdb-etl-3.0.1.jar'...
2018-06-02 09:48:01:910 INFO Installing dynamic plugin 'orientdb-neo4j-importer-plugin-3.0.1-dist.jar'...
2018-06-02 09:48:01:941 INFO Installing dynamic plugin 'orientdb-teleporter-3.0.1.jar'...
2018-06-02 09:48:02:026 INFO Installing dynamic plugin 'orientdb-studio-3.0.1.zip'...
2018-06-02 09:48:02:061 INFO ODefaultPasswordAuthenticator is active
2018-06-02 09:48:02:081 INFO OServerConfigAuthenticator is active
2018-06-02 09:48:02:091 INFO OSystemUserAuthenticator is active
2018-06-02 09:48:02:106 INFO [OVariableParser.resolveVariables] Property not found: distributed
2018-06-02 09:48:02:232 WARNI Authenticated clients can execute any kind of code into the server by using the following allowed languages: [sql]
2018-06-02 09:48:02:253 INFO OrientDB Studio available at http://192.168.0.103:2480/studio/index.html
2018-06-02 09:48:02:260 INFO OrientDB Server is active v3.0.1 - Veloce (build d31da1499f29f04af751d0a8ad108152b2593c8b, branch develop).
netstat -ant | grep -i listen
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp6 0 0 :::2424 :::* LISTEN
tcp6 0 0 ::1:25 :::* LISTEN
tcp6 0 0 :::2480 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN

Connect to OrientDB Console

You can connect OrientDB console using the command line interface to working with the application. Run the following command to connect OrientDB console.

/opt/orientdb/bin/console.sh
OrientDB console v.3.0.1 - Veloce (build d31da1499f29f04af751d0a8ad108152b2593c8b, branch develop) https://www.orientdb.com Type 'help' to display all the supported commands.
orientdb> connect remote:127.0.0.1 root
Enter password:
OK
orientdb {server=remote:127.0.0.1}>

Create OrientDB System Service

Next, you will need to create an OrientDB system service file to run OrientDB as a daemon on the system.

useradd -r orientdb -s /sbin/nologin
chown -R orientdb:orientdb /opt/orientdb
nano /opt/orientdb/bin/orientdb.sh
ORIENTDB_DIR="/opt/orientdb"
ORIENTDB_USER="orientdb"
chmod 640 /opt/orientdb/config/orientdb-server-config.xml
cp /opt/orientdb/bin/orientdb.service /etc/systemd/system/
nano /etc/systemd/system/orientdb.service
[Service]
User=orientdb
Group=orientdb
ExecStart=/opt/orientdb/bin/server.sh
systemctl daemon-reload
systemctl start orientdb
systemctl enable orientdb
systemctl status orientdb
● orientdb.service - OrientDB Server
Loaded: loaded (/etc/systemd/system/orientdb.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-06-02 10:44:53 IST; 3s ago
Main PID: 2922 (java)
CGroup: /system.slice/orientdb.service
└─2922 java -server -Xms1G -Xmx1G -Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF8 -Dr
Jun 02 10:44:53 Node1 server.sh[2922]: .,,,,::,,,,,,,: `: , ,, : ` : : .: ::: ::: ::: :::
Jun 02 10:44:53 Node1 server.sh[2922]: ...,::,,,,::.. `: .,, :, : : : .: ::::::::::: ::: :::
Jun 02 10:44:53 Node1 server.sh[2922]: ,::::,,,. `: ,, ::::: : : .: ::::::::: ::::::::::
Jun 02 10:44:53 Node1 server.sh[2922]: ,,:` `,,.
Jun 02 10:44:53 Node1 server.sh[2922]: ,,, .,`
Jun 02 10:44:53 Node1 server.sh[2922]: ,,. `, VELOCE
Jun 02 10:44:53 Node1 server.sh[2922]: `` `.
Jun 02 10:44:53 Node1 server.sh[2922]: `` www.orientdb.com
Jun 02 10:44:53 Node1 server.sh[2922]: `
Jun 02 10:44:53 Node1 server.sh[2922]: removing old pid file /opt/orientdb/bin/orient.pid

Access OrientDB Web Interface

OrientDB is now installed and configured, it’s time to access OrientDB Web Interface.

Secure OrientDB Web Server

The default OrientDB installation allows access to OrientDB Studio from the public network. So it is recommended to prevent the access from the Internet to OrientDB Studio and console. You can do this by editing the orientdb-server-config.xml file:

nano /opt/orientdb/config/orientdb-server-config.xml
<listener protocol="binary" socket="default" port-range="2424-2430" ip-address="0.0.0.0"/>
<listener protocol="http" socket="default" port-range="2480-2490" ip-address="0.0.0.0">
<listener protocol="binary" socket="default" port-range="2424-2430" ip-address="127.0.0.1"/>
<listener protocol="http" socket="default" port-range="2480-2490" ip-address="127.0.0.1">
systemctl restart orientdb

Related Alibaba Cloud Products

Batch Compute is a cloud service for massive simultaneous batch processing. The system automatically manages resources, schedules tasks, loads data, and bills by usage. Batch Compute is already widely used in scenarios such as scientific applications, genetic data analysis, CGI rendering, media transcoding, and financial data analysis.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com