21.7 C
Texas
angeloma
Senior Writer and partner

How to install ArangoDB on Ubuntu 20.04?

In this post, you will learn how to install ArangoDB on Ubuntu 20.04 So let’s go for it

What is ArangoDB?

ArangoDB is a native multi-model, open-source database with flexible data models for documents, graphs, and key-values. Build high-performance applications using a convenient SQL-like query language or JavaScript extensions. Use ACID transactions if you require them. Scale horizontally and vertically with a few mouse clicks.

On the other hand, to offer graph functionalities, they make use of _from and _to attributes that allow connecting the information. This, in conjunction with edge indexes, allows the processing of graph queries with a great performance.

Install ArangoDB on Ubuntu 20.04

as a great alternative to MongoDB as a NoSQL database manager. This makes us think that the installation of ArangoDB can be complicated but it is not thanks to the repository that the developers give us.

- Advertisement -

So, install some packages needed to add the repository.

:~$ sudo apt install curl apt-transport-https

Then, download the GPG key from the repository:

:~$ curl -OL https://download.arangodb.com/arangodb36/DEBIAN/Release.key
1.- Download the GPG key for the ArangoDB repository
1.- Download the GPG key for the ArangoDB repository

So, add it to the system with this command:

:~$ sudo apt-key add - < Release.key
Ok

Then add the repository as such:

:~$ echo 'deb https://download.arangodb.com/arangodb36/DEBIAN/ /' | sudo tee /etc/apt/sources.list.d/arangodb.list

The next step is to reroute the APT cache.

:~$ sudo apt update

And now yes, install ArangoDB with the following command:

:~$ sudo apt install arangodb3=3.6.4-1
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
nodejs
The following NEW packages will be installed:
arangodb3
The following packages will be upgraded:
nodejs
1 upgraded, 1 newly installed, 0 to remove and 47 not upgraded.
1 not fully installed or removed.
Need to get 82.1 MB/106 MB of archives.
After this operation, 327 MB of additional disk space will be used.
Do you want to continue? [Y/n]
2.- Installing ArangoDB on Ubuntu 20.04
2.- Installing ArangoDB on Ubuntu 20.04

At the time of writing, the latest stable version is 3.6.4-1. If a new one comes out, just replace this value.

When the installation is happening, you will be asked to set a root password.

3.- Set a root password for ArangoDB
3.- Set a root password for ArangoDB

Then, you will be asked if you want to update the database files automatically.

4.- Configuring ArangoDB on Ubuntu 20.04
4.- Configuring ArangoDB on Ubuntu 20.04

On the next screen, you can choose the database engine.

5.- Database storage engine
5.- Database storage engine

Then you will be asked if you want to back up the database before updating.

6.- Configure ArangoDB to backup the databases before upgrading
6.- Configure ArangoDB to backup the databases before upgrading

Then the whole installation will continue.

You can check the service status with the following command:

:~$ sudo systemctl status arangodb3
sudo systemctl status arangodb3.service
● arangodb3.service - ArangoDB database server
Loaded: loaded (/lib/systemd/system/arangodb3.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-06-02 02:07:43 UTC; 33s ago
Main PID: 1567 (arangod)
Tasks: 28 (limit: 131072)
Memory: 164.0M
CGroup: /system.slice/arangodb3.service
└─1567 /usr/sbin/arangod --uid arangodb --gid arangodb --pid-file /var/run/arangodb3/arangod.pid --temp.path /var/tmp/arangodb3 --log.foreground-tty true
Jun 02 02:07:43 osradar arangod[1567]: 2020-06-02T02:07:43Z [1567] WARNING [49528] {memory} execute 'sudo sysctl -w "vm.max_map_count=128000"'
Jun 02 02:07:43 osradar arangod[1567]: 2020-06-02T02:07:43Z [1567] INFO [43396] {authentication} Jwt secret not specified, generating…
Jun 02 02:07:43 osradar arangod[1567]: 2020-06-02T02:07:43Z [1567] INFO [144fe] using storage engine 'rocksdb'
Jun 02 02:07:43 osradar arangod[1567]: 2020-06-02T02:07:43Z [1567] INFO [3bb7d] {cluster} Starting up with role SINGLE
Jun 02 02:07:43 osradar arangod[1567]: 2020-06-02T02:07:43Z [1567] INFO [6ea38] using endpoint 'http+tcp://127.0.0.1:8529' for non-encrypted requests
Jun 02 02:07:43 osradar arangod[1567]: 2020-06-02T02:07:43Z [1567] INFO [a1c60] {syscall} file-descriptors (nofiles) hard limit is 131072, soft limit is 131072
Jun 02 02:07:43 osradar arangod[1567]: 2020-06-02T02:07:43Z [1567] INFO [3844e] {authentication} Authentication is turned on (system only), authentication for unix sock>
Jun 02 02:07:46 osradar systemd[1]: /lib/systemd/system/arangodb3.service:28: PIDFile= references a path below legacy directory /var/run/, updating /var/run/arangodb3/a>
Jun 02 02:07:48 osradar arangod[1567]: 2020-06-02T02:07:48Z [1567] INFO [857d7] {authentication} Creating user "root"
Jun 02 02:07:48 osradar arangod[1567]: 2020-06-02T02:07:48Z [1567] INFO [cf3f4] ArangoDB (version 3.6.4 [linux]) is ready for business. Have fun!
7.- ArangoDB service status
7.- ArangoDB service status

Enabling the ArangoDB web interface

One of the most powerful tools of ArangoDB is undoubtedly its web graphic interface. With it, you can perform many operations quickly and even monitor the operation of the entire program. By default, it only comes authorized for local access, but we can change this if the database is remote.

So, open the ArangoDB configuration file:

:~$ sudo nano /etc/arangodb3/arangod.conf

And change the next line:

endpoint = tcp://127.0.0.1:8529

By:

endpoint = tcp://192.168.250.20:8529
8.- Enable the ArangoDB web interface
8.- Enable the ArangoDB web interface

Note: in this case, 192.168.250.20 is the IP address of the computer where ArangoDB is installed.

Save the changes and close the editor.

Finally, restart the ArangoDB service.

:~$ sudo systemctl restart arangodb3

Now open your web browser and go to http://server-ip:8529 and you will see the following:

9.- ArangoDB login screen
9.- ArangoDB login screen

Enter the root user and the password you created before and you will see the dashboard.

10.- ArangoDB on Ubuntu 20.04
10.- ArangoDB on Ubuntu 20.04

So, enjoy it.

Conclusion

ArangoDB is a program that is having a lot of recent success due to its easy handling and robustness, in addition to its flexibility which makes it ideal for complex tasks.

So now you know how to install it on Ubuntu 20.04

So, share this post and join our Telegram channel

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article