Site icon DesignLinux

How to Install CouchDB on Debian 11

how-to-install-couchdb-on-debian-11

Apache CouchDB is an open-source NoSQL database developed by the Apache Software Foundation. It uses JSON to represent data stored in a database. The CouchDB RESTful HTTP/JSON API allows you to read, edit, delete and create database documents. In this guide, we will explain how to install CouchDB on Debian 11 system.

How to Install CouchDB on Debian 11

Perform the following steps to install CouchDB on your Debian system:

Step 1 – Update system packages

First of all you should update the system packages using below given command:

sudo apt update && sudo apt upgrade

Step 2 – Add CouchDB repository

Next, we will add CouchDB repository and import GPG key as root or user with sudo privileges:

echo "deb https://apache.bintray.com/couchdb-deb buster main" | sudo tee -a /etc/apt/sources.list
curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -

Step 3 – Install CouchDB

After that, update the packages list and install CouchDB by issuing below given commands:

sudo apt update
sudo apt install couchdb

It will prompt you to choose option whether you want to install CouchDB in a standalone or clustered mode. We’ll install the CouchDB in a single-server standalone mode.

In next step, you can set IP address on which CouchDB will bind. Leave it as default value 127.0.0.1. If you are configuring a cluster, enter the interface IP address or type 0.0.0.0, which tells CouchDB to binds to all network interfaces.

After that, set the password for admin. If you leave this field blank it will not create admin user. It is highly recommended to set the password, and take CouchDB out of the insecure “admin party” mode.

Again enter the password to confirm and the installation will continue.

Step 4 – Verify Installation

The CouchDB server will run at localhost:5984. Run the following curl command to display information about the CouchDB database in JSON format:

curl http://127.0.0.1:5984/

If it will print output as following means that the installation was successful and the service is running.

{
   "couchdb":"Welcome",
   "version":"3.2.2",
   "git_sha":"03a77db6c",
   "uuid":"advb3f42ce6a07245d2955c1d6832266",
   "features":[
      "access-ready",
      "partitioned",
      "pluggable-storage-engines",
      "reshard",
      "scheduler"
   ],
   "vendor":{
      "name":"The Apache Software Foundation"
   }
}

You can access the CouchDB web-based interface by entering http://127.0.0.1:5984/_utils/ to your web browser. It will show as following:

Conclusion

You have successfully learned how to install CouchDB on Debian 11 system. To learn more, take a look at Apache CouchDB Documentation.

If you have any question or feedback, please leave comment below.

Exit mobile version