Installation

OrientDB is available in two editions:

  • Community Edition This edition is released as an open source project under the Apache 2 license. This license allows unrestricted free usage for both open source and commercial projects.

  • Enterprise Edition OrientDB Enterprise Edition is commercial software built on top of the Community Edition. Enterprise is developed by the same team that developed the OrientDB engine. It serves as an extension of the Community Edition, providing Enterprise features, such as:

    • Query Profiler
    • Distributed Clustering configuration
    • Metrics Recording
    • Live Monitoring with configurable Alerts

The Community Edition is available as a binary package for download or as source code on GitHub. The Enterprise Edition license is included with Support purchases.

Prerequisites

Both editions of OrientDB run on any operating system that implements the Java Virtual machine (JVM). Examples of these include:

  • Linux, all distributions, including ARM (Raspberry Pi, etc.)
  • Mac OS X
  • Microsoft Windows, from 95/NT and later
  • Solaris
  • HP-UX
  • IBM AIX

OrientDB requires Java, version 1.7 or higher.

Note: In OSGi containers, OrientDB uses a ConcurrentLinkedHashMap implementation provided by concurrentlinkedhashmap to create the LRU based cache. This library actively uses the sun.misc package which is usually not exposed as a system package. To overcome this limitation you should add property org.osgi.framework.system.packages.extra with value sun.misc to your list of framework properties.

It may be as simple as passing an argument to the VM starting the platform:

  1. $ java -Dorg.osgi.framework.system.packages.extra=sun.misc

Installing OrientDB

There are two methods available to install OrientDB, with some variations on each depending on your operating system. The first method is to download a binary package from OrientDB. The other method is to compile the package from the source code.

Binary Installation

OrientDB provides a pre-compiled binary package to install the database on your system. Depending on your operating system, this is a tarred or zipped package that contains all the relevant files you need to run OrientDB. For desktop installations, go to OrientDB Downloads and select the package that best suits your system.

On server installations, you can use the wget utility:

  1. $ wget https://orientdb.com/download.php?file=orientdb-community-2.1.2.tar.gz

Whether you use your web browser or wget, unzip or extract the downloaded file into a directory convenient for your use, (for example, /opt/orientdb/ on Linux). This creates a directory called orientdb-community-2.1.2 with relevant files and scripts, which you will need to run OrientDB on your system.

Source Code Installation

In addition to downloading the binary packages, you also have the option of compiling OrientDB from the Community Edition source code, available on GitHub. This process requires that you install Git and Apache Maven on your system.

To compile OrientDB from source code, clone the Community Edition repository, then run Maven (mvn) in the newly created directory:

  1. $ git clone https://github.com/orientechnologies/orientdb
  2. $ git checkout develop
  3. $ cd orientdb
  4. $ mvn clean install

It is possible to skip tests:

  1. $ mvn clean install -DskipTests

The develop branch contains code for the next version of OrientDB. Stable versions are tagged on master branch. For each maintained version OrientDB has its own hotfix branch. As the time of writing this notes, the state of branches is:

  • develop: work in progress for next 2.2.x release (2.2.0-SNAPSHOT)
  • 2.1.x: hot fix for next 2.1.x stable release (2.1.10-SNAPSHOT)
  • 2.0.x: hot fix for next 2.0.x stable release (2.0.17-SNAPSHOT)
  • last tag on master is 2.1.9

The build process installs all jars in the local maven repository and creates archives under the distribution module inside the target directory. At the time of writing, building from branch 2.1.x gave:

  1. $ls -l distribution/target/
  2. total 199920
  3. 1088 26 Jan 09:57 archive-tmp
  4. 102 26 Jan 09:57 databases
  5. 102 26 Jan 09:57 orientdb-community-2.1.10-SNAPSHOT.dir
  6. 48814386 26 Jan 09:57 orientdb-community-2.1.10-SNAPSHOT.tar.gz
  7. 53542231 26 Jan 09:58 orientdb-community-2.1.10-SNAPSHOT.zip
  8. $

The directory orientdb-community-2.1.10-SNAPSHOT.dir contains the OrientDB distribution uncompressed. Take a look to Contribute to OrientDB if you want to be involved.

Update Permissions

For Linux, Mac OS X and UNIX-based operating system, you need to change the permissions on some of the files after compiling from source.

  1. $ chmod 755 bin/*.sh
  2. $ chmod -R 777 config

These commands update the execute permissions on files in the config/ directory and shell scripts in bin/, ensuring that you can run the scripts or programs that you’ve compiled.

Post-installation Tasks

For desktop users installing the binary, OrientDB is now installed and can be run through shell scripts found in the package bin directory of the installation. For servers, there are some additional steps that you need to take in order to manage the database server for OrientDB as a service. The procedure for this varies, depending on your operating system.

Upgrading

When the time comes to upgrade to a newer version of OrientDB, the methods vary depending on how you chose to install it in the first place. If you installed from binary downloads, repeat the download process above and update any symbolic links or shortcuts to point to the new directory.

For systems where OrientDB was built from source, pull down the latest source code and compile from source.

  1. $ git pull origin master
  2. $ mvn clean install

Bear in mind that when you build from source, you can switch branches to build different versions of OrientDB using Git. For example,

  1. $ git checkout 2.1.x
  2. $ mvn clean install

builds the 2.1.x branch, instead of master.

Other Resources

To learn more about how to install OrientDB on specific environments, please refer to the guides below: