How to Install and Use ArangoDB on Ubuntu Linux

ArangoDB is a free, open-source, multi-model NoSQL database system offering high availability and eliminating single failure points. It offers a paid version for enterprises with additional support. Supporting native multi-model and search capabilities, ArangoDB is utilized by companies processing large volumes of data. The article also provides a detailed guide on installing and configuring ArangoDB…

This article explains how to install and use ArangoDB on Ubuntu Linux.

ArangoDB provides a free, 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 enterprises 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 by small and large companies that process massive amounts of data. The system provides synchronous replication, automatic failover, and a self-organizing cluster with no single points of failure.

For more about ArangoDB, please visit its homepage.

Install Required Packages

To get the latest version of ArangoDB, you can either use it.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 install ArangoDB.

Install ArangoDB

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

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

wget -q https://download.arangodb.com/arangodb34/DEBIAN/Release.key -O- | sudo apt-key add -
echo 'deb https://download.arangodb.com/arangodb34/DEBIAN/ /' | sudo tee /etc/apt/sources.list.d/arangodb.list

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

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 to upgrade the database file automatically, 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 completion.

After installation, the commands below can stop, start, and enable the 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 to 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 log into the interactive database 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

Access the ArangoDB Web Interface

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

http://localhost:8529

Login with the root password

Enjoy!

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

You may also like the post below:

Richard Avatar

Comments

Leave a Reply

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


Exit mobile version