The NoSQL database concept is very fashionable. So much so that we talk about it here. Its speed and design make it perfect for cloud-based projects. Today, I’ll show you how to install Apache CouchDB on Ubuntu 18.04.
CouchDB is a database manager oriented to NoSQL documents belonging to the Apache foundation. Its main strength is its focus on scalability. In addition, it allows you to run a single logical database server on any number of servers or VMs. Of course, it is Open source. So, you can join the community.
On the other hand, CouchDB takes the reliability of the data very seriously and its replication protocol makes it a safe bet to carry out your personal projects without data problems.
So, let’s install Apache CouchDB.
1. Install Apache web server
So, the first step is to install Apache web server. It enjoys great popularity among developers for its ease of installation and its great compatibility with multiple applications.
To install it, run this command:
:~$ sudo apt install apache2
Next, enable and start the Apache web server service.
:~$ sudo systemctl enable apache2 :~$ sudo systemctl start apache2
Now, open your web browser and go to http://IP_SERVER
. If everything went OK, you will see this image.
Apache web server is correctly installed.
2. Install Apache CouchDB
CouchDB is a great application but is not included by default in the main Ubuntu repositories. Therefore, it is necessary to install it from an external one.
First, add the repository.
:~$ echo "deb https://apache.bintray.com/couchdb-deb bionic main" | sudo tee -a /etc/apt/sources.list
Next, sign the added repository:
:~$ curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -
Then, install CouchDB.
:~$ sudo apt update && sudo apt install couchdb
During the installation process, you will need to configure CouchDB. The first question is how to configure CouchDB. There are 3 options, Standalone for a single server; clustered if you will use a cluster or none if you want to configure it manually.
After this, it is necessary to configure the network interface of the CouchDB node. In the image are the instructions, however, it is recommended 0.0.0.0.0 for you to be able to access from all networks.
Finally, set a password for admin user.
Next, start and enable the service.
:~$ sudo systemctl start couchdb :~$ sudo systemctl enable couchdb
Finally, open your web browser and go to http://YOUR_IP:5984/_utils
and access the web interface to manage the program.
And that’s it.
Conclusion
CouchDB is a fairly new program that belongs to Apache. This guarantees us a fairly stable, reliable and Open source product to handle NoSQL databases.
Please share this article with your friends.