Site icon DesignLinux

How to Install CouchDB on Debian 10

CouchDB is a high-performance opensource NoSQL solution where data is stored in JSON-based document format as key/value pairs, lists, or maps. It provides a RESTFUL API that enables users to easily manage database documents by performing tasks such as reading, editing, and deleting objects.

CouchDB offers great benefits such as fast indexing and easy replication of databases across various instances in a network. In this guide, we cover how you can install CouchDB on Debian 10.

Step 1: Add CouchDB Repository on Debian

We will begin by logging in to our Debian server and updating the package lists using the apt package manager as shown:

$ sudo apt update

Next, we need to add the CouchDB repository for Debian as follows:

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

Afterward, import the GPG key using the curl command as shown.

$ curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -
Add CouchDB Repository in Debian

Step 2: Install CouchDB on Debian

With the CouchDB repository in place, update the system package list to sync the newly added repo.

$ sudo apt update

Then install CouchDB using the apt package manager as shown:

$ sudo apt install couchdb
Install CouchDB on Debian

Halfway through, you will be prompted to provide some key details. First, you will be required to specify the type of configuration you’d want to set up for your instance. Since we are only installing on a single server, select the ‘standalone’ option.

Configure CouchDB in Debian

Next, provide the network bind interface. This is initially set to the localhost address – 127.0.0.1. However, you can set it to 0.0.0.0 so that it can listen to all network interfaces.

Configure CouchDB Network Interface

Thereafter, provide the admin password. This is the password that will be used when accessing CouchDB via the WebUI.

Set CouchDB Admin Password

And confirm it.

Confirm CouchDB Admin Password

Step 3: Verify that CouchDB is Running

CouchDB listens to port 5984 by default. You can verify this by invoking the netstat utility as follows:

$ sudo netstat -pnltu | grep 5984
Confirm CouchDB Port

Alternatively, you can use system service to verify is the CouchDB daemon is running:

$ sudo systemctl status couchdb
Check CouchDB Status

Great, our CouchDB instance is running as expected.

Step 4: Accessing CouchDB via WebUI

The management of CouchDB is easy, thanks to the simple and intuitive web interface that it provides. To access CouchDB, browse the URL:

http://localhost:5984 

You will be required to log in using the username and the password that you set during the installation.

CouchDB Admin Login

Upon logging in, you will get the following interface.

CouchDB Dashboard

And that wraps it up. We have walked you through the installation of CouchDB on Debian 10.

Exit mobile version