How to Install and Configure CouchDB on Ubuntu 20.04

how to install and configure couchdb on Ubuntu 20.04

CouchDB is an open source NoSQL database it was a document based database. CouchDB was executed in Erlang. CouchDB using various formats to store the data. It is using JSON to store data. CouchDB was maintained by the Apache software foundation. HTTP API is used for create and modify databases.

In this tutorial we are going to learn how to install CouchDB on Ubuntu 20.04. Let see the step-by-step tutorial for Ubuntu 20.04 CouchDB installation.

Import CouchDB GPG Key:

Before starting the CouchDB installation we have to add the CouchDB GPG key to Ubuntu 20.04.

To add the GPG key

curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -

Add CouchDB Repository:

After adding GPG key now add the CouchDB repository to Ubuntu 20.04 using following command

To import CouchDB Repository

echo "deb https://apache.bintray.com/couchdb-deb focal main" | sudo tee -a /etc/apt/sources.list

Install CouchDB:

After adding CouchDB repository, now update the packages then install the CouchDB on Ubuntu 20.04. To update and install CouchDB run the command below.

sudo apt update
sudo apt install couchdb

When installing CouchDB it prompts to CouchDB configuration, on the first prompt just select ok and click enter then move to next now you have to select standalone mode or clustered mode.

For single-server configuration select the standalone mode and clustered configuration select clustered mode. In this tutorial we will choose clustered mode.

After selecting modes it prompts to enter couchdb interface bind address if you selected standalone mode leave and click enter and clustered mode enter this address 0.0.0.0 and click enter.

Now the next screen prompts to set the password for user “admin” if you left blank this field admin user will not be created. Set the password and enter the next step.

On the next prompt confirm the same password

We have successfully installed CouchDB on Ubuntu 20.04.

Couchdb verification:

Now verify the CouchDB installation by execution below command.

Note: Don’t forgot to open 5984 port.

curl http://your_ip_address:5984/
Output

{
  "couchdb": "Welcome",
  "version": "3.1.0",
  "git_sha": "ff0feea20",
  "uuid": "0cf4fb48daa                                                                                                             1ac97e690a1fee2a48a46",
  "features": [
    "access-ready",
    "partitioned",
    "pluggable-storage-engines",
    "reshard",
    "scheduler"
  ],
  "vendor": {
    "name": "The Apache Software Foundation"
  }
}

Access CouchDB Web:

After getting successful output access the web interface.

http://your_ip_address or domain_name:5984/_utils/

Now login with username “admin” and password you created before.

Conclusion:

Successfully we have installed and configured CouchDB on Ubuntu 20.04. In this article we have learned about CouchDB installation and configuration. Hope this helps.

Next Article: How to Install Apache Cassandra and Configure on Ubuntu 20.04

Leave a Reply

Post your comments here

You May Also Like