How to Install and Configure ArangoDB on Ubuntu 16.04 | 18.04

ArangoDB provides a free and open-source, multi-model NoSQL database system with high availability across multiple systems thus eliminating a single failure point. There’s also a paid version for enterprise with support features.

If you need a database management system with native multi-model and search capabilities, including high availability, you may want to look at ArangoDB.

This database platform is used small and large companies who process massive amount of data. The system provides synchronous replication, automatic failover and self-organizing cluster. with no single points of failure.

This brief tutorial shows students and new users how to install ArangoDB on Ubuntu 16.04 | 18.04 LTS servers.

For more about ArangoDB, please visit its homepage.

If you want to test it in your lab environment before going out and using it in production, the steps below should be a great place to start.Follow the steps below to get ArangoDB installed on Ubuntu

Step 1: Install Required Packages

To get the latest version of ArangoDB, you can either use its .DEB file from its website or add its official repository to Ubuntu. However, some required packages may be needed for the installation to work.

First, run the commands below to install apt-transport-https.

sudo apt update
sudo apt install apt-transport-https

After installing the package above, continue below to installing ArangoDB.

Step 2: Installing ArangoDB

Now that some required packages are installed, follow the steps below to get ArangoDB installed and configured. If you don’t want to manually install the ArangoDB from its .DEB file, then add ArangoDB’s official package repository to make installing and updating it easier.

To add ArangoDB repository and key, run the commands below. The first line imports the repository’s GPG key. the second adds ArangoDB repository into a new file called arangodb.list.

wget -q  -O- | sudo apt-key add -
echo 'deb  /' | sudo tee /etc/apt/sources.list.d/arangodb.list

After the steps above, run the commands below to install it.

sudo apt update
sudo apt install arangodb3

During the installation, you’ll be prompted to create a root password for the database system. Type and confirm the new password.

   ┌───────────────────────────────┤ Configuring arangodb3 ├───────────────────────────────┐
   │ Please enter the password for the database root user account that should be granted   │ 
   │ administrative privileges                                                             │ 
   │                                                                                       │ 
   │ password for the ArangoDB "root" user:                                                │ 
   │                                                                                       │ 
   │ _____________________________________________________________________________________ │ 
   │                                                                                       │ 
   │                    <Ok>                         <Cancel>                              │ 
   │                                                                                       │ 
   └───────────────────────────────────────────────────────────────────────────────────────┘ 

When prompted whether to automatically upgrade the database file, choose Yes

  ┌────────────────────────────────┤ Configuring arangodb3 ├────────────────────────────────┐
  │                                                                                         │ 
  │ On subsequent updates of this package your database files will have to be upgraded      │ 
  │ before they can be used with the newer version of ArangoDB. If you select "yes" here,   │ 
  │ the files will be automatically upgraded whenever a newer version of ArangoDB is        │ 
  │ installed in the future. If you select "no" here, the package will be rendered          │ 
  │ 'unstable' and you will need to manually invoke the upgrade procedure on each package   │ 
  │ upgrade.                                                                                │ 
  │                                                                                         │ 
  │ Automatically upgrade database files?                                                   │ 
  │                                                                                         │ 
  │                     <Yes>                            <No>
  │                                                                                         │ 
  └─────────────────────────────────────────────────────────────────────────────────────────┘

Then choose auto for the storage engine.

 ┌────────────────────────────────┤ Configuring arangodb3 ├─────────────────────────────────┐
 │ Choose which storage engine you want to use. Please note that you can't switch storage   │ 
 │ engines of existing installations, a dump and restore is required therefore. 'auto'      │ 
 │ will pick the existing one or default to rocksdb since ArangoDB 3.4, and to mmfiles      │ 
 │ before.                                                                                  │ 
 │                                                                                          │ 
 │ Database storage engine                                                                  │ 
 │                                                                                          │ 
 │                                         auto                                             │ 
 │                                         rocksdb                                          │ 
 │                                         mmfiles                                          │ 
 │                                                                                          │ 
 │                                                                                          │ 
 │                     <Ok>                            <Cancel>                             │ 
 │                                                                                          │ 
 └──────────────────────────────────────────────────────────────────────────────────────────┘ 

Continue with the installation and complete.

After installing the commands below can be used to stop, start and enable ArangoDB service.

sudo systemctl stop arangodb3
sudo systemctl start arangodb3
sudo systemctl enable arangodb3

To verify that ArangoDB is installed and running, run the commands below check its status.

sudo systemctl status arangodb3

You should see similar lines as shown below:

● arangodb3.service - ArangoDB database server
   Loaded: loaded (/lib/systemd/system/arangodb3.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-02-19 13:42:32 CST; 14s ago
 Main PID: 4591 (arangod)
    Tasks: 18 (limit: 131072)
   CGroup: /system.slice/arangodb3.service
           └─4591 /usr/sbin/arangod --uid arangodb --gid arangodb --pid-file /var/run/arangodb3/

Feb 19 13:42:32 ubuntu1804 arangod[4591]: 2019-02-19T19:42:32Z [4591] INFO ArangoDB 3.4.2-1 [lin
Feb 19 13:42:32 ubuntu1804 arangod[4591]: 2019-02-19T19:42:32Z [4591] INFO detected operating sy
Feb 19 13:42:34 ubuntu1804 arangod[4591]: 2019-02-19T19:42:34Z [4591] INFO ArangoDB (version 3.4

That should do it!

If you want to change the root password, stop the database service, then run the commands below:

sudo arango-secure-installation

To logon to the database interactive shell, run the command below

arangosh

You should be welcomed to the terminal.

                                       _     
  __ _ _ __ __ _ _ __   __ _  ___  ___| |__  
 / _` | '__/ _` | '_ \ / _` |/ _ \/ __| '_ \ 
| (_| | | | (_| | | | | (_| | (_) \__ \ | | |
 \__,_|_|  \__,_|_| |_|\__, |\___/|___/_| |_|
                       |___/                 

arangosh (ArangoDB 3.4.2-1 [linux] 64bit, using jemalloc, build tags/v3.4.2.1-0-g91afc6501f, VPack 0.1.33, RocksDB 5.16.0, ICU 58.1, V8 5.7.492.77, OpenSSL 1.1.0j  20 Nov 2018)
Copyright (c) ArangoDB GmbH

Connected to ArangoDB 'http+tcp://127.0.0.1:8529' version: 3.4.2-1 [server], database: '_system', username: 'root'

Type 'tutorial' for a tutorial or 'help' to see common examples

Step 3: Accessing ArangoDB Web Interface

ArangoDB also comes with a web interface for easy management in your web browser. To logon, go the server hostname or IP address followed by port # 8529

Logon with the root password

Enjoy!

ArangoDB Ubuntu Install

Congratulations! You have successfully installed ArangoDB on Ubuntu 16.04 and 18.05

You may also like the post below: