How VPS - How to use/setup VPS
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

How to Install and Configure OrientDB Community Edition on CentOS 7

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
19
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Step 1: Install OpenJDK 8 packages
  3. Step 2: Install OrientDB
  4. Step 3 (optional): Configure OrientDB Community Edition to use less memory
  5. Step 4: Start the OrientDB server manually
  6. Step 5: Connect to the OrientDB server
    1. Option 1: use an OrientDB console
    2. Option 2: via a web browser
  7. Step 6: Configure OrientDB as service
  8. Want to contribute?


OrientDB is a next-gen multi-model open source NoSQL DBMS. With support for multiple data models, OrientDB can provide more functionality and flexibility in a scalable, high-performance operational database.

In this tutorial, I will demonstrate how to install OrientDB Community Edition on a CentOS 7 server instance.

Prerequisites

  • A Vultr CentOS 7 server instance with sufficient memory. 2GB or more of memory recommended. Say its IP address is 203.0.113.1.
  • You have logged into the server instance as a sudo user.
  • The server instance has been updated to the latest stable status.

Step 1: Install OpenJDK 8 packages

OrientDB requires Java 1.7 or greater. In this tutorial, I choose to install OpenJDK 8 packages as follows:

sudo yum install -y java-1.8.0-openjdk-devel

Having OpenJDK 8 installed, use the below command to verify the result:

java -version

If nothing goes wrong, the output should resemble:

openjdk version "1.8.0_141"
OpenJDK Runtime Environment (build 1.8.0_141-b16)
OpenJDK 64-Bit Server VM (build 25.141-b16, mixed mode)

Next, you need to setup the JAVA_HOME environment variable:

echo "JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")" | sudo tee -a /etc/profile
source /etc/profile

Step 2: Install OrientDB

Download OrientDB 2.2.26 GA Community Edition for Linux, the latest stable release of OrientDB Community Edition at the time of this article was written, from the official OrientDB download page:

cd
wget https://bit.ly/orientdb-ce-imps-2-2-26-linux -O orientdb-community-importers-2.2.26.tar.gz

Decompress the downloaded archive to the /opt directory:

sudo tar -zxvf orientdb-community-importers-2.2.26.tar.gz -C /opt

Create a soft link in order to simplify daily use and future updates:

sudo ln -s /opt/orientdb-community-importers-2.2.26/ /opt/orientdb

Step 3 (optional): Configure OrientDB Community Edition to use less memory

Although smoothly running OrientDB Community Edition requires that your machine has 2GB or more of memory, you can still deploy it on a server with less memory to start with.

To do that, use the vi text editor to open the /opt/orientdb/bin/server.sh file:

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

Find the line:

ORIENTDB_OPTS_MEMORY="-Xms2G -Xmx2G"

As you see, the Xms and Xmx parameters specify the initial and maximum memory allocation pool for the Java Virtual Machine when running OrientDB. In order to decrease memory usage of OrientDB, you can modify this line as below:

 ORIENTDB_OPTS_MEMORY="-Xms256m -Xmx512m"

Note: The value of Xms should not be less than 128m, or the OrientDB server won’t start up.

Save and quit:

:wq!

Step 4: Start the OrientDB server manually

You can manually start the OrientDB server by executing the /opt/orientdb/bin/server.sh script in your SSH terminal window:

sudo /opt/orientdb/bin/server.sh

Since it is the first time you run the OrientDB server, the script will ask you to setup a password for the OrientDB root user, say it is yourpasswordhere. If you leave the password field blank, the script will automatically generate a password for the OrientDB root user. The credentials created here will be used for authentication when you logging in using a binary connection (OrientDB console) or a web connection (OrientDB Studio) later.

If the OrientDB server gets started properly, you will see a message line which assembles:

2017-08-22 04:02:09:065 INFO  OrientDB Server is active v2.2.26 (build ae9fcb9c075e1d74560a336a96b57d3661234c7b). [OServer]

Any time you’d like to quit, Press Ctrl-C to stop the OrientDB server.

Step 5: Connect to the OrientDB server

When the OrientDB server is up and running, it will listen on port 2424 (for binary connections) and port 2480 (for HTTP connections). That means you can connect to a running OrientDB server using not only an OrientDB console but also a web browser.

Option 1: use an OrientDB console

Keep the SSH connection in which the server.sh script is running alive, and then establish a second SSH connection to the same server instance.

In the second SSH console window, use the following command to start the OrientDB console on the server:

sudo /opt/orientdb/bin/console.sh

In the console’s shell, connect to the OrientDB server as below:

orientdb> connect remote:127.0.0.1 root yourpasswordhere

If you successfully connect to the OrientDB server, you will see the output below:

Connecting to remote Server instance [remote:127.0.0.1] with user 'root'...OK
orientdb {server=remote:127.0.0.1/}>

After finishing your job, type exit to quit the OrientDB console.

Note: You can also use a local console.sh (on Linux) or console.bat (on Windows) script to connect the OrientDB server. In that case, you need to allow inbound traffic on the server’s 2424 port.

sudo firewall-cmd --zone=public --permanent --add-port=2424/tcp
sudo firewall-cmd --reload
Option 2: via a web browser

A more intuitive method to connect the OrientDB server is to use a web browser.

First of all, you need to open the 2480 port of the OrientDB server as below:

sudo firewall-cmd --zone=public --permanent --add-port=2480/tcp
sudo firewall-cmd --reload

Next, point your favorite web browser to http://203.0.113.1:2480, and then you will be redirected into a page which is called OrientDB Studio. On this page, you can use the root user’s credentials you setup earlier to log in.

On the OrientDB Studio web interface, you can do almost all the things you can do in the OrientDB console. Feel free to navigate the system and test your queries.

Step 6: Configure OrientDB as service

In step 2, we have installed OrientDB in the /opt/orientdb-community-importers-2.2.26 directory. But up till now, all these files are just a bunch of scripts that can only be executed manually. In order to setup an operational server, it is necessary to configure OrientDB as a system-level daemon which get started on system boot.

1) Press Ctrl-C in the first terminal window to stop the OrientDB server.

2) Create a dedicated user orientdb which belongs to the orientdb group for running the OrientDB server:

sudo useradd -r orientdb -s /sbin/nologin

3) Change the ownership of the OrientDB directory:

sudo chown -R orientdb:orientdb /opt/orientdb-community-importers-2.2.26

4) Use the vi editor to open the /opt/orientdb/bin/orientdb.sh file:

sudo vi /opt/orientdb/bin/orientdb.sh

Find the following lines:

ORIENTDB_DIR="YOUR_ORIENTDB_INSTALLATION_PATH"
ORIENTDB_USER="USER_YOU_WANT_ORIENTDB_RUN_WITH"

Replace them with:

ORIENTDB_DIR="/opt/orientdb"
ORIENTDB_USER="orientdb"

Save and quit:

:wq!

5) In order to prevent unauthorized access to OrientDB’s configurations, you need to modify permissions to that config file as follows:

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

6) Create a systemd startup script to manage the OrientDB service:

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

Use the vi editor to open this file:

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

Find the following lines:

User=ORIENTDB_USER
Group=ORIENTDB_GROUP
ExecStart=$ORIENTDB_HOME/bin/server.sh

Replace them with:

User=orientdb
Group=orientdb
ExecStart=/opt/orientdb/bin/server.sh

Save and quit:

:wq!

Start and enable the OrientDB service:

sudo systemctl daemon-reload
sudo systemctl start orientdb.service
sudo systemctl enable orientdb.service

That’s it. In this fashion, the OrientDB will automatically start up on system boot. And this concludes the tutorial. Thanks for reading.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
How VPS

How VPS

Related Posts

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Install BoltWire CMS on CentOS 7
CentOS

How to Install BoltWire CMS on CentOS 7

February 14, 2020
Showterm.io – A Terminal/Shell Recording, Upload and Share Tool for Linux
CentOS

Setup HTTP Authentication With Nginx on CentOS 7

February 14, 2020
Next Post

How to Install MODX Revolution on a CentOS 7 LAMP VPS

Installing NodeJS and Express on CentOS

Install Wordpress with Apache, PHP and MySQL (Automated Startup Script)

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow Us

  • 121 Followers
  • 87.2k Followers

Recommended

Installing Gentoo Linux on a Vultr Server

3 years ago

How to Install Couch CMS 2.0 on a CentOS 7 LAMP VPS

3 years ago

How to Deploy Ghost v0.11 LTS on Ubuntu 16.04

3 years ago

Install TaskServer (taskd) on Debian 9

3 years ago

Instagram

    Please install/update and activate JNews Instagram plugin.

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

Topics

Apache Web Server Bluehost Review 2019 Bluehost Review 2020 Bluehost Review 2021 Centmin Mod CentminMod centos install htop fsck htop install HTTP DoS attack Install Snort on an Ubuntu install Zabbix on CentOS install Zabbix on CentOS 7 Linux Commands linux guide linux install htop linux vps setup guide MariaDB MariaDB Error Mysql mysqld error optimize MariaDB optimize Mysql snort Ubuntu
No Result
View All Result

Highlights

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Webmin Reviews

Virtualmin Reviews

CentOS Web Panel Reviews

Ajenti Reviews

ISPConfig Reviews

Trending

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

by How VPS
February 25, 2022
0

I tried to update some extensions by use yum on centOs which I specified in Dockerfile. After...

How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020
Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

February 17, 2020
Webmin Reviews

Webmin Reviews

February 17, 2020
How VPS – How to use/setup VPS

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Visit our landing page to see all features & demos.
LEARN MORE »

Recent News

  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8 February 25, 2022
  • How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”? November 17, 2020
  • How to optimize Mysql or MariaDB November 3, 2020

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

[mc4wp_form]

© 2018 JNews - City News Magazine WordPress theme. All rights belong to their respective owners.
JNews is a top selling 2018 WordPress News, Blog, Newspaper & Magazine Theme.

No Result
View All Result
  • Home

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.