How to Install CouchDB NoSQL Database on Debian Server 11
Jack Wallen shows you how to install the CouchDB NoSQL database server and how to access its web GUI.
Although MongoDB is faster than CouchDB, CouchDB offers mobile support and replication, works with map shrink functions, and supports standalone and clustered deployments. One of the main differences between CouchDB and other databases is that it offers a flexible format for storing information.
Some of CouchDB’s most attractive features include the following:
- Easy database replication across multiple servers
- Fast indexing and retrieval
- REST-like interface
- JSON-based document format
- Multiple Libraries Supported
- Data updates you can subscribe to on the _changes feed
I want to walk you through the process of installing CouchDB on Debian 11 server. The process is quite simple and shouldn’t take you more than five minutes. I will demonstrate installing CouchDB in standalone mode (in a later post I will explain how to deploy CouchDB as a cluster).
SEE: Recruitment Kit: Database Engineer (TechRepublic Premium)
What you will need
Since we will be installing it in standalone mode, you will only need a single Debian Server instance and a user with sudo privileges.
How to install dependencies
The first thing we are going to do is install the necessary dependencies. Connect to your Debian server and run the command:
sudo apt-get install -y curl apt-transport-https gnupg nano lsb-release -y
How to add the CouchDB repository
Next, we’ll add the CouchDB repository. First, add the GPG key with:
curl https://couchdb.apache.org/repo/keys.asc | gpg --dearmor | sudo tee /usr/share/keyrings/couchdb-archive-keyring.gpg >/dev/null 2>&1
Then add the repository with the command:
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
How to install CouchDB
Finally, we can install CouchDB with the commands:
sudo apt-get update
sudo apt-get install couchdb -y
During installation, you will be prompted to configure CouchDB. First, you need to select the type of configuration that meets your needs. Since we are installing in standalone mode, make sure to select the correct option, press OK and press Enter (Figure A).
Next, you will need to enter a cookie name (Figure B), which is used for all nodes in a cluster. Type whatever you want here (like trtest), tab to OK and hit enter.
In the next window (Figure C), you will want to replace
0.0.0.0so you can access the web GUI.
Finally, you must enter and verify a password for the admin user (Figure D).
The installation completes and you are ready to access the web GUI.
How to Access the Web GUI
Open a web browser and point it to
http://SERVER:5984/_utils/ (where SERVER is the IP address or domain of the hosting server). A login window will appear (Figure E), where you will enter the admin username and password you created during installation.
Once you have successfully authenticated, you will be presented with the main CouchDB web GUI, where you can begin creating your databases.
Congratulations, you now have a running instance of the CouchDB NoSQL database server. Next time we will deploy a CouchDB cluster for even more power.
Subscribe to TechRepublic How to make technology work on YouTube for all the latest tech tips for professionals from Jack Wallen.