Hello, friends. Today, you will learn how to install CouchDB on Debian 11.
Introduction
Apache CouchDB is a NoSQL open source document-oriented database that allows us to manage a large amount of unstructured data in a distributed way.
That is why CouchDB is mainly used in Big Data. One of the most important features of CouchDB is that it has a powerful replication system.
Despite being used in complex applications and situations, CouchDB is quite intuitive, and we will be able to use it without too many problems starting from a solid base.
CouchDB uses several formats and protocols to store, transmit and process data. The main format for data storage is JSON. This makes it understandable and web browser friendly.
Let’s go for it.
Installing CouchDB on Debian 11
CouchDB is an excellent tool, but it is not present in the official Debian 11 repositories. This makes that we have to resort to others to install it. Don’t worry, the process is simple.
First, connect via SSH to your server, then update it.
sudo apt update
sudo apt upgrade
Next, install some packages needed for CouchDB installation.
sudo apt install curl apt-transport-https gnupg nano lsb-release
CouchDB is not in the official repositories, but it provides one for Debian 11. So add it:
echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ `lsb_release -cs` main" \.
| sudo tee /etc/apt/sources.list.d/couchdb.list >/dev/null
Next, import the GPG key to secure the repository.
curl https://couchdb.apache.org/repo/keys.asc | gpg --dearmor | sudo tee /usr/share/keyrings/couchdb-archive-keyring.gpg >/dev/null 2>&1
Now update APT so that it can load the added repository:
sudo apt update
The next step is to install CouchDB.
sudo apt install couchdb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libmozjs-78-0
The following NEW packages will be installed:
couchdb libmozjs-78-0
0 upgraded, 2 newly installed, 0 to remove and 9 not upgraded.
Need to get 31.1 MB of files.
After this operation, 64.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] [Y/n]
During the installation process, you will be asked some CouchDB configuration questions. Be sure to read them carefully so that you don’t get any errors.
First, you need to define if it will be clustered or standalone.
Next, set an Erlang Magic cookie
![1.- Installing CouchDB](https://unixcop.com/wp-content/uploads/2022/06/1-13-1024x346.png)
Then set the IP address where the node will listen.
![2.- Configuring CouchDB on Debian 11](https://unixcop.com/wp-content/uploads/2022/06/2-8-1024x371.png)
And finally, the admin password.
![3.- Set the password to the admin user](https://unixcop.com/wp-content/uploads/2022/06/3-4-1024x352.png)
You are done!
Remember that you can modify the configuration through the /opt/couchdb/etc/local.ini
file.
You can access the CouchDB web interface by opening a browser through the http://your-server:5984/_utils
address.
![4.- CouchDB log in](https://unixcop.com/wp-content/uploads/2022/06/4-3-1024x495.png)
![5.- CouchDB running](https://unixcop.com/wp-content/uploads/2022/06/5-1-1024x495.png)
Conclusion
In this post, you learned how to install CouchDB on Debian 11.