Setup OrientDB 3.0.0.m2 on Ubuntu 16.04

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. It supports schema-less, schema-full and schema-mixed modes. It has a strong security profiling system based on users and roles and supports querying with Gremlin along with SQL extended for graph traversal.

OrientDB uses several indexing mechanisms based on B-tree and Extendible hashing, the last one is known as “hash index”.

Prerequisite

Install java 8 as pre-requisite for OrientDB. Add Oracle Java PPA to your system before proceeding with the installation of Java.

$ sudo add-apt-repository -y ppa:webupd8team/java 
$ sudo apt-get update 
$ sudo apt-get -y install oracle-java8-installer

krishna@Ubuntu:~$ java -version
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)
krishna@Ubuntu:~$

Install

Download OrientDB tar file from the site OrientDB (wget http://orientdb.com/download.php?file=orientdb-community-tp3-3.0.0m2.tar.gz&utm_source=Labs&utm_medium=link&utm_campaign=300) site and extract to /opt location on unix. Installation is pretty simple download, extract and run.

By default 2G of memory is allocated to Java Virtual Machine for smooth running of OrientDB. We can still deploy with lesser memory, edit the file bin/server.sh and make the necessary changes.

# tar -zxvf orientdb-community-tp3-3.0.0m2.tar.gz
# ln -s orientdb-community-tp3-3.0.0m2 orientdb
# cd orientdb

Replace the below line in bin/server.sh
ORIENTDB_OPTS_MEMORY="-Xms2G -Xmx2G"
with 
ORIENTDB_OPTS_MEMORY="-Xms256m -Xmx512m"
# tar -zxvf orientdb-community-tp3-3.0.0m2
# ln -s orientdb-community-tp3-3.0.0m2 orientdb 
# cd orientdb 

Replace the below line in bin/server.sh 
ORIENTDB_OPTS_MEMORY="-Xms2G -Xmx2G" 
with 
ORIENTDB_OPTS_MEMORY="-Xms256m -Xmx512m"

krishna@Ubuntu:~$ wget -O - https://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -

root@ubuntu:/opt/orientdb/bin# ./server.sh
           .
          .`        `
          ,      `:.
         `,`    ,:`
         .,.   :,,
         .,,  ,,,
    .    .,.:::::  ````                                 :::::::::     :::::::::
    ,`   .::,,,,::.,,,,,,`;;                      .:    ::::::::::    :::    :::
    `,.  ::,,,,,,,:.,,.`  `                       .:    :::      :::  :::     :::
     ,,:,:,,,,,,,,::.   `        `         ``     .:    :::      :::  :::     :::
      ,,:.,,,,,,,,,: `::, ,,   ::,::`   : :,::`  ::::   :::      :::  :::    :::
       ,:,,,,,,,,,,::,:   ,,  :.    :   ::    :   .:    :::      :::  :::::::
        :,,,,,,,,,,:,::   ,,  :      :  :     :   .:    :::      :::  :::::::::
  `     :,,,,,,,,,,:,::,  ,, .::::::::  :     :   .:    :::      :::  :::     :::
  `,...,,:,,,,,,,,,: .:,. ,, ,,         :     :   .:    :::      :::  :::     :::
    .,,,,::,,,,,,,:  `: , ,,  :     `   :     :   .:    :::      :::  :::     :::
      ...,::,,,,::.. `:  .,,  :,    :   :     :   .:    :::::::::::   :::     :::
           ,::::,,,. `:   ,,   :::::    :     :   .:    :::::::::     ::::::::::
           ,,:` `,,.
          ,,,    .,`
         ,,.     `,                                          GRAPH DATABASE
       ``        `.
                 ``                                          orientdb.com
                 `
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

2017-12-13 19:54:26:694 INFO  Loading configuration from: /opt/orientdb/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2017-12-13 19:54:27:020 INFO  OrientDB Server v3.0.0m2 (build 31b455cec3cc97d11be0748e31ed1a03ff6a23ac) is starting up... [OServer]
2017-12-13 19:54:27:074 WARNI Not enough physical memory available for DISKCACHE: 2,000MB (heap=494MB direct=524,288MB). Set lower Maximum Heap (-Xmx setting on JVM) and restart OrientDB. Now running with DISKCACHE=256MB [orientechnologies]
2017-12-13 19:54:27:078 INFO  OrientDB config DISKCACHE=256MB (heap=494MB direct=524,288MB os=2,000MB) [orientechnologies]
2017-12-13 19:54:27:190 INFO  Databases directory: /opt/orientdb-community-tp3-3.0.0m2/databases [OServer]
2017-12-13 19:54:27:240 INFO  Creating the system database 'OSystem' for current server [OSystemDatabase]
2017-12-13 19:54:30:419 INFO  Listening binary connections on 0.0.0.0:2424 (protocol v.37, socket=default) [OServerNetworkListener]
2017-12-13 19:54:30:435 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.   |
+---------------------------------------------------------------+

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

2017-12-13 19:54:44:534 INFO  Installing dynamic plugin 'orientdb-studio-3.0.0m2.zip'... [OServerPluginManager]
2017-12-13 19:54:44:538 INFO  [OVariableParser.resolveVariables] Error on resolving property: distributed [orientechnologies]
2017-12-13 19:54:44:553 WARNI Authenticated clients can execute any kind of code into the server by using the following allowed languages: [sql] [OServerSideScriptInterpreter]
2017-12-13 19:54:44:556 INFO  ODefaultPasswordAuthenticator is active [ODefaultPasswordAuthenticator]
2017-12-13 19:54:44:557 INFO  OServerConfigAuthenticator is active [OServerConfigAuthenticator]
2017-12-13 19:54:44:559 INFO  OSystemUserAuthenticator is active [OSystemUserAuthenticator]
2017-12-13 19:54:44:565 INFO  OrientDB Studio available at http://10.0.2.15:2480/studio/index.html [OServer]
2017-12-13 19:54:44:568 INFO  OrientDB Server is active v3.0.0m2 (build 31b455cec3cc97d11be0748e31ed1a03ff6a23ac). [OServer]

Now, access the OrientDB using the below URL.

http://localhost:2480 or http://<IP Address>:2480 OrientDB Dashboard

OrientDB Data

OrientDB Data

OrientDB Data

Conclusion:

We have successfully setup OrientDB.

Enjoy !!!

One Comment

  1. To increase the OrientDB Web Interface timeout use this parameter network.http.sessionExpireTimeout

                    
                        
                        
                        
                    

Leave a Reply

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