Saturday, September 19, 2020

How to Install CouchDB on RHEL 8 (Red Hat Enterprise Linux) Operating System

Must read

How to Install Node.js and NPM on Debian 10 Linux

The Node.js is the very well-known JavaScript runtime environment used to JavaScript code server-side execution. It is an Open-source, cross-platform supported environment....

How to Deploy Rocket.Chat on Debian 10 Linux

Rocket.Chat is a very popular open-source team communication system; it is famous as an alternative to Slack. It provides various features along...

How to Install Tomcat 9 on Ubuntu 20.04 Operating System

The Apache Tomcat software is an open source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies. Apache...

How to Install Docker on Ubuntu 20.04 Linux

Docker is an application use to simplify the application management process in containers, where containers use to run the application with the...
SATISH KUMAR
I am Satish Kumar, Founder of LinuxConcept. Linux and F.O.S.S enthusiast, love to work on open source platform and technologies.
The CouchDB is an open-source database system, managed by the Apache Software Foundation. It is fault-tolerant, and schema-free NoSQL database management system.
 
CouchDB store data in document or files with JSON data structure. Each document contains fields and attachments, where fields have text, numbers, lists, Booleans, and more data. The data of this database accessed by using RESTful HTTP/JSON API that use to read, create, edit, and delete database files or documents.
 
Today, In this tutorial, we will learn how to install CouchDB on RHEL 8 (Red Hat Enterprise Linux) machine.

Prerequisites

Before starting the installation tutorial, make sure you have a RHEL 8 running machine and user access to log in to the machine with sudo privileges.

CouchDB repository Enable

The CouchDB repository use EPEL repository to install into Red Hat Operating system which is available from Official repository of CouchDB.

So, to install CouchDB on Red Hat machine first need to enable the EPEL repository on the system, which can be done by run following commands:

$ sudo yum install epel-release

Now, create the CouchDB repository files using below command:

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

Copy the following content into the CouchDB repository file.

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


[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

Install CouchDB on RHEL 8

After enabling the repository on Red Hat system, you can update the repository package list and install CouchDB, as shown below:

$ sudo yum update
$ sudo yum install couchdb

After Completing the installation of CouchDB, you can enable and run the CouchDB service using following command:

$ sudo systemctl start couchdb
$ sudo systemctl enable couchdb
CouchDB default installation will always listen on localhost and there are no pre configured admin account.
 
The CouchDB configuration files are stored into the “/opt/couchdb” directory.

To create an admin account, configure admin username and password into the local.ini file under [admin] section in the format username = password.

$ sudo vim /opt/couchdb/etc/local.ini
/opt/couchdb/etc/local.ini


[admins]
admin = mysecretpassword

Use the same above formate to create as many admin account and restart the couchdb service to apply these settings.

$ sudo systemctl restart couchdb

To create system databases “_users”, “_replicator” and “_global_changes”, using curl command as shown below:

$ 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

After successful creation of database, you will get the output like:

Output:

{"ok":true}

Verify CouchDB Installation

You can verify CouchDB installation by running the curl command, which will print database information in JSON format, as shown below:

$ curl http://127.0.0.1:5984/

The output will look like below format:

{  
   "couchdb":"Welcome",
   "version":"2.3.1",
   "git_sha":"c298091a4",
   "uuid":"370903b5400643c2979838f5b68348c1",
   "features":[  
      "pluggable-storage-engines",
      "scheduler"
   ],
   "vendor":{  
      "name":"The Apache Software Foundation"
   }
}

You can verify CouchDB installation on GUI also by access the IP address on the browser, as shown below:

http://127.0.0.1:5984/_utils/

Conclusion

Congratulation, Now you learned “How to install CouchDB on RHEL 8 machine?” and you can also verify if already installed CouchDB in any Red Hat system. You can learn more about CouchDB using Apache CouchDB Documentation.

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to Install Node.js and NPM on Debian 10 Linux

The Node.js is the very well-known JavaScript runtime environment used to JavaScript code server-side execution. It is an Open-source, cross-platform supported environment....

How to Deploy Rocket.Chat on Debian 10 Linux

Rocket.Chat is a very popular open-source team communication system; it is famous as an alternative to Slack. It provides various features along...

How to Install Tomcat 9 on Ubuntu 20.04 Operating System

The Apache Tomcat software is an open source implementation of the Java Servlet, JavaServer Pages, Java Expression Language and Java WebSocket technologies. Apache...

How to Install Docker on Ubuntu 20.04 Linux

Docker is an application use to simplify the application management process in containers, where containers use to run the application with the...

How To Set Up Nginx Server Blocks on Debian 10 Linux

Nginx Server Block is use to configure and run more than one website or web application on a single server/system. The Nginx Server...