Atlantic.Net Blog

How to Install ArangoDB on Ubuntu 20.04

Hitesh Jethva
by Atlantic.Net (86posts) under VPS Hosting
0 Comments

ArangoDB is a free, open-source NoSQL database with a flexible data model for documents, graphs, and key-values.  It is a multi-purpose and multi-model database developed by triAGENS GmbH. ArangoDB comes with a simple and easy-to-use web interface and CLI for managing and monitoring databases. It is used in small and large organizations that process large amounts of data. ArangoDB is designed for high-performance and scalable applications that use SQL-like query language.

In this tutorial, we will explain how to install the ArangoDB database on Ubuntu 20.04.

Prerequisites

  • A fresh Ubuntu 20.04 VPS on the Atlantic.net Cloud Platform
  • A root password configured on your server

Step 1 – Create an Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server.  Create a new server, choosing Ubuntu 20.04 as the operating system, with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your Ubuntu 20.04 server, run the following command to update your base system with the latest available packages.

apt-get update -y

Step 2 – Install ArangoDB

By default, ArangoDB is not available in the Ubuntu 20.04 default repository, so you will need to add the ArangoDB repository to your system.

First, install some required dependencies using the following command-

apt-get install gnupg2 apt-transport-https -y

Once all the dependencies are installed, import the ArangoDB GPG key and add the repository with the following command:

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

Next, update the repository and install the ArangoDB with the following command:

apt-get update -y
apt-get install arangodb3 -y

During the installation, you will be asked to set the root password as shown below:

Provide your desired password and hit OK button. You should see the following page:

Re-enter the password and hit OK. You should see the following page:

Click on the OK button to automatically upgrade database files. You should see the following page:

Select the database storage engine and hit the Ok button. You should see the following page:

Click on the Yes button to back up the database before upgrading.

Once the installation has been completed, start the ArangoDB service and enable it to start at system reboot with the following command:

systemctl start arangodb3
systemctl enable arangodb3

Step 3 – Connect ArangoDB Shell

ArangoDB comes with a command-line utility to manage the databases. You can connect the ArangoDB shell with the following command:

arangosh

You will be asked to provide the password as shown below:

Please specify a password:

Provide the root password which you have set during the installation and hit enter. You should see the following output:

Now, create a database named mydb with the following command:

127.0.0.1:[email protected]_system> db._createDatabase("mydb");

Next, create a database user with the following command:

127.0.0.1:[email protected]_system> var users = require("@arangodb/users");
127.0.0.1:[email protected]_system> users.save("[email protected]", "password");

You should see the following output:

{
  "user" : "[email protected]",
  "active" : true,
  "extra" : {
  },
  "code" : 201
}

Next, grant all the privileges to the mydb database with the following command:

127.0.0.1:[email protected]_system> users.grantDatabase("[email protected]", "mydb");

Now, you can list your databases using the following command:

127.0.0.1:[email protected]_system> db._databases()

You should see the following output:

[
  "_system",
  "mydb"
]

Now, exit from the ArangoDB shell with the following command:

127.0.0.1:[email protected]_system> exit

Now, verify the ArangoDB connection using the database and user which you have created earlier using the following command:

arangosh --server.username "[email protected]" --server.database mydb

You will be asked to provide password as shown below:

Please specify a password:

Provide the password of the myuser and hit Enter. You should see the following output:

Now, exit from the ArangoDB shell with the following command:

127.0.0.1:[email protected]_system> exit

Step 4 – Access ArangoDB Web Interface

ArangoDB comes with a web-based interface for managing and monitoring ArangoDB. By default, it is configured to access only from the localhost. So you will need to configure ArangoDB for external access. You can configure it by editing the file /etc/arangodb3/arangod.conf:

nano /etc/arangodb3/arangod.conf

Find the following line:

endpoint = tcp://127.0.0.1:8529

And replace it with the following line:

endpoint = tcp://your-server-ip:8529

Save and close the file, then restart the ArangoDB service to apply the changes.

systemctl restart arangodb3

Now, open your web browser and type the URL http://your-server-ip:8529. You should see the ArangoDB login page:

Provide your ArangoDB root username and password and click on the Login button. You should see the ArangoDB dashboard in the following page:

Conclusion

In this tutorial, you learned how to install ArangoDB on Ubuntu 20.04. You also learned how to user ArangoDB shell to create a database and user. ArangoDB is a very good alternative to MongoDB and can be used in a mission-critical environment. Get started with ArangoDB on VPS Hosting from Atlantic.Net!

Get A Free To Use Cloud VPS

Free Tier Includes:
G2.1GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G2.1GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources