Apache CouchDB is an open-source database software that focuses on ease of use and having a scalable architecture. Apache CouchDB lets you access your data where you need it.

In this guide, we will explain how to install CouchDB on CentOS 8.

Deploying your cloud server
If you have not already registered with Cloudwafer, you should begin by getting signed up. Take a moment to create an account after which you can easily deploy your own cloud servers.

Once you have signed up, log into your Cloudwafer Client Area with the password provided in your mail and deploy your Cloudwafer cloud server.

Updating System Packages
It is always recommended that you update the system to the latest packages before beginning any major installations. This is done with the command below:

sudo yum update

Step 1: Enable CouchDB Repository
The CouchDB repository is reliant on the EPEL repository, so the first step is to install the EPEL repo if you haven't with the command below:

sudo yum install epel-release

Next, create a repo file:

sudo nano /etc/yum.repos.d/bintray-apache-couchdb-rpm.repo

Enter the following:

[bintray--apache-couchdb-rpm]
name=bintray--apache-couchdb-rpm
baseurl=http://apache.bintray.com/couchdb-rpm/el$releasever/$basearch/
gpgcheck=0
repo_gpgcheck=0
enabled=1

Step 2: Install CouchDB
After enabling the repository and creating the CouchDB repository, issue the following command to install the CouchDB packages:

 sudo yum install couchdb

Press y to confirm the installation.

After installation, enable and start the CouchDB service bu issuing the commands below:

sudo systemctl start couchdb
sudo systemctl enable couchdb

CouchDB listens on localhost only and no admin account is created on installation by default.

The configuration files for CouchDB are stored in the /opt/couchdb directory. To create an admin account open the local.ini file and add a line under the [admins] section using the format username = password. Restart CouchDB service to change the plain text password to a hash for security purposes.

Step 3: Confirming CouchDB Installation
To check if the installation was done successfully, issue the following curl command that will display the CouchDB database information in JSON format:

curl http://127.0.0.1:5984/

You can visit the Apache CouchDB Documentation to learn more about CouchDB.