How To Install OrientDB on CentOS 7

To Install OrientDB on CentOS 7

OrientDB is a free and open source NoSQL database management system. 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. OrientDB comes with an integrated web based graphical user interface to easily manage the database through a web browser. It supports ACID transactions as well as atomic operations and easily returns complete graph with interconnected documents. Its query language is built on SQL and it supports three different indexing algorithms for faster performance.

 

Installing OrientDB 

First, you need to create a directory for OrientDB and download OrientDB package into the newly created directory by making use of the following command.

[root@linuxhelp ~]# mkdir /opt/orientdb
[root@linuxhelp ~]# wget https://orientdb.com/download.php?file=orientdb-community-importers-2.2.29.tar.gz -O /opt/orientdb/orientdb.tar.gz
--2018-02-20 16:22:27--  https://orientdb.com/download.php?file=orientdb-community-importers-2.2.29.tar.gz
Resolving orientdb.com (orientdb.com)... 67.227.164.32
Connecting to orientdb.com (orientdb.com)|67.227.164.32|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 45447408 (43M) [application/forced-download]
Saving to: ‘ /opt/orientdb/orientdb.tar.gz’ 

100%[======================================> ] 45,447,408  1.27MB/s   in 65s    

2018-02-20 16:23:33 (687 KB/s) - ‘ /opt/orientdb/orientdb.tar.gz’  saved [45447408/45447408]


Once it is done, enter into the OrientDB directory and extract downloaded file as follows. 

[root@linuxhelp ~]# cd /opt/orientdb/
[root@linuxhelp orientdb]# tar -xf orientdb.tar.gz

 

 

Move the files present inside the extracted orientdb-community directory to current (orientdb) directory and for that make use of the following command. 

[root@linuxhelp orientdb]# mv orientdb-community*/* .
Installation complete


Now, you need to run the server, make use of the following command for the same purpose. 

[root@linuxhelp orientdb]# bin/server.sh
           .                                          
          .`        `                                 
          ,      `:.                                  
         `,`    ,:`                                   
         .,.   :,,                                    
         .,,  ,,,                                     
    .    .,.:::::  ````                                 :::::::::     :::::::::   
    ,`   .::,,,,::.,,,,,,`                        .:    ::::::::::    :::    :::  
    `,.  ::,,,,,,,:.,,.`  `                       .:    :::      :::  :::     ::: 
     ,,:,:,,,,,,,,::.   `        `         ``     .:    :::      :::  :::     ::: 
      ,,:.,,,,,,,,,: `::, ,,   ::,::`   : :,::`  ::::   :::      :::  :::    :::  
       ,:,,,,,,,,,,::,:   ,,  :.    :   ::    :   .:    :::      :::  :::::::     
        :,,,,,,,,,,:,::   ,,  :      :  :     :   .:    :::      :::  :::::::::   
  `     :,,,,,,,,,,:,::,  ,, .::::::::  :     :   .:    :::      :::  :::     ::: 
  `,...,,:,,,,,,,,,: .:,. ,, ,,         :     :   .:    :::      :::  :::     ::: 
    .,,,,::,,,,,,,:  `: , ,,  :     `   :     :   .:    :::      :::  :::     ::: 
      ...,::,,,,::.. `:  .,,  :,    :   :     :   .:    :::::::::::   :::     ::: 
           ,::::,,,. `:   ,,   :::::    :     :   .:    :::::::::     ::::::::::  
           ,,:` `,,.                                  
          ,,,    .,`                                  
         ,,.     `,                                          GRAPH DATABASE  
       ``        `.                                                          
                 ``                                          orientdb.com
                 `                                    

2018-02-20 16:25:04:248 INFO  Loading configuration from: /opt/orientdb/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2018-02-20 16:25:04:913 INFO  OrientDB Server v2.2.29 (build 9914189f972103907c24377a1567897e68642920) is starting up... [OServer]
2018-02-20 16:25:04:918 INFO  Databases directory: /opt/orientdb/databases [OServer]
2018-02-20 16:25:05:069 WARNI Not enough physical memory available for DISKCACHE: 1,822MB (heap=1,963MB direct=524,288MB). Set lower Maximum Heap (-Xmx setting on JVM) and restart OrientDB. Now running with DISKCACHE=256MB [OMemoryAndLocalPaginatedEnginesInitializer]
2018-02-20 16:25:05:070 INFO  OrientDB config DISKCACHE=256MB (heap=1,963MB direct=524,288MB os=1,822MB) [OMemoryAndLocalPaginatedEnginesInitializer]
2018-02-20 16:25:05:074 WARNI The sum of the configured JVM maximum heap size (2058354688 bytes) and the OrientDB maximum cache size (268435456 bytes) is larger than the available physical memory size (1910771712 bytes). That may cause out of memory errors, please tune the configuration up. Use the -Xmx JVM option to lower the JVM maximum heap memory size or storage.diskCache.bufferSize OrientDB option to lower memory requirements of the cache. [OMemory]
2018-02-20 16:25:05:280 INFO  {db=OSystem} Creating the system database ' OSystem'  for current server [OSystemDatabase]
2018-02-20 16:25:08:055 INFO  Listening binary connections on 0.0.0.0:2424 (protocol v.36, socket=default) [OServerNetworkListener]
2018-02-20 16:25:08:058 INFO  Listening http connections on 0.0.0.0:2480 (protocol v.10, socket=default) [OServerNetworkListener]

+---------------------------------------------------------------+
|                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.   |
+---------------------------------------------------------------+


While executing the above command, you will be asked for a password for root, so give the password. 

Root password [BLANK=auto generate it]: ****
Please confirm the root password: ****

2018-02-20 16:25:16:236 INFO  Installing dynamic plugin ' orientdb-studio-2.2.29.zip' ... [OServerPluginManager]
2018-02-20 16:25:16:238 INFO  Installing dynamic plugin ' orientdb-etl-2.2.29.jar' ... [OServerPluginManager]
2018-02-20 16:25:16:247 INFO  Installing dynamic plugin ' orientdb-teleporter-2.2.29.jar' ... [OServerPluginManager]
2018-02-20 16:25:16:258 INFO  Installing dynamic plugin ' orientdb-neo4j-importer-plugin-2.2.29-dist.jar' ... [OServerPluginManager]
2018-02-20 16:25:16:264 INFO  ODefaultPasswordAuthenticator is active [ODefaultPasswordAuthenticator]
2018-02-20 16:25:16:266 INFO  OServerConfigAuthenticator is active [OServerConfigAuthenticator]
2018-02-20 16:25:16:267 INFO  OSystemUserAuthenticator is active [OSystemUserAuthenticator]
2018-02-20 16:25:16:277 INFO  Installed GREMLIN language v.2.6.0 - graph.pool.max=50 [OGraphServerHandler]
2018-02-20 16:25:16:278 INFO  [OVariableParser.resolveVariables] Error on resolving property: distributed [orientechnologies]
2018-02-20 16:25:16:283 WARNI Authenticated clients can execute any kind of code into the server by using the following allowed languages: [sql] [OServerSideScriptInterpreter]
2018-02-20 16:25:16:286 INFO  OrientDB Studio available at http://192.168.7.240:2480/studio/index.html [OServer]
2018-02-20 16:25:16:287 INFO  OrientDB Server is active v2.2.29 (build 9914189f972103907c24377a1567897e68642920). [OServer]

Now the server is running.


OrientDB  use    2 port  2424& 2480 .    2424 port is used for binary connection and 2480 is used for HTTP connection.

 

If you want to check if the connections are active and running, run the following command. 

root@linuxhelp orientdb]#  netstat -plunt | grep 2424 
tcp6       0      0 :::2424                 :::*                    LISTEN      14769/java          
[root@linuxhelp orientdb]#  netstat -plunt | grep 2480
tcp6       0      0 :::2480                 :::*                    LISTEN      14769/java          

 

 

Now, to open a console mode run the following command.

[root@linuxhelp orientdb]# bin/console.sh 
OrientDB console v.2.2.29 (build 9914189f972103907c24377a1567897e68642920) https://www.orientdb.com
Type ' help'  to display all the supported commands.
Installing extensions for GREMLIN language v.2.6.0
orientdb> 

To connect to database , use following command. 


Root & 123 indicates username and  password

orientdb>  connect remote:192.168.7.240 root 123  

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

Now, the database is connected. With this, this tutorial on the installation of OrientDB on CentOS 7 comes to an end. 

FAQ
Q
Why OrientDB is so fast?
A
OrientDB has been designed to be very fast. It inherits the best features and concepts from Object Databases, Graph DBMS and modern NoSQL engines. OrientDB manages relationships without the run-time costly join operation, but rather with direct pointers (links) between records.
Q
How does it compare with other products?
A
As Multi-Model DBMS, OrientDB could work as an extended Document Database and an extended Graph Database. Take a look at OrientDB vs MongoDB for Document Databases and OrientDB vs Neo4j to have a comparison with a popular Graph Database.
Q
What is orientdb?
A
OrientDB is an open source NoSQL database management system written in Java. It is a multi-model database, supporting graph, document, key/value, and object models, but the relationships are managed as in graph databases with direct connections between records.
Q
What are the commands used to backup in Orientdb?
A
By using this command you can run the backup script

./backup.sh []
Q
Is OrientDB a Relational DBMS
A
No. OrientDB adheres to the NoSQL movement even though it supports ACID Transactions and SQL as query language. In this way it's easy to start using it without having to learn too much new stuff.