How to Install CouchDB on CentOS 8

CouchDB is an open source NoSQL database based on common standards to facilitate Web accessibility and compatibility with a variety of devices. NoSQL databases are useful for very large sets of distributed data, especially for the large amounts of non-uniform data in various formats that is characteristic of big data.

Install CouchDB on CentOS 8; Through this tutorial, we will learn how to install CouchDB on CentOS 8.

How to Install CouchDB on CentOS 8

Follow the following steps to install CouchDB on CentOS 8:

  • Step 1 – Enabling CouchDB Repository
  • Step 2 – Installing CouchDB on CentOS
  • Step 3 – Configuring CouchDB
  • Step 4 – Verifying CouchDB Installation

Step 1 – Enabling CouchDB Repository

First of all, open terminal and execute the following command on command line or terminal to enable the vendor repository and install the binary packages:

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

Then paste the following content to the file:

[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 – Installing CouchDB on CentOS

Now, execute the following command on command line or terminal to Install the CouchDB packages:

sudo dnf install couchdb

Once the installation is completed, enable and start the CouchDB service:

sudo systemctl enable --now couchdb

Step 3 – Configuring CouchDB

We can configure CouchDB using the Fauxton, at http://127.0.0.1:5984/_utils#setup or from the command-line. The Setup Wizard will guide you through the mode selection and admin creation.

We’ll create the admin user and the databases from the command-line.

So, open terminal and execute the following command on command line or terminal to set password for admin:

sudo nano /opt/couchdb/etc/local.ini

Then add admin password into the following file and save it:

[admins]
admin = mysecretpassword

After that restart the CouchDB service to change the password to a hash:

sudo systemctl restart couchdb

Note that, we can use curl to create the system databases _users_replicator, and _global_changes:

curl -u ADMINUSER:PASS -X PUT http://127.0.0.1:5984/_users
curl -u ADMINUSER:PASS -X PUT http://127.0.0.1:5984/_replicator
curl -u ADMINUSER:PASS -X PUT http://127.0.0.1:5984/_global_changes

Step 4 – Verifying CouchDB Installation

To verify whether the installation was successful and the service is running, so run the following curl command that will print information about the CouchDB database in JSON format:

curl http://127.0.0.1:5984/

Conclusion

Through this tutorial, we have learned how to install CouchDB on CentOS 8.

Recommended CentOS Tutorials

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of PHP, Python, Javascript, JQuery, Laravel, Livewire, Codeigniter, Node JS, Express JS, Vue JS, Angular JS, React Js, MySQL, MongoDB, REST APIs, Windows, Xampp, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL and Bootstrap from a starting stage. As well as demo example.

Leave a Reply

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