How To Install Apache CouchDB on Ubuntu 22.04 LTS
In this tutorial, we will show you how to install Apache CouchDB on Ubuntu 22.04 LTS. For those of you who didn’t know, Apache CouchDB is a NoSQL document-oriented database system that is known for its simplicity, scalability, and fault tolerance. It is designed to help you easily store, manage, and retrieve data in a distributed environment. CouchDB has a RESTful API that enables you to interact with the database using HTTP requests.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of the Apache CouchDB on Ubuntu 22.04 (Jammy Jellyfish). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.
Prerequisites
- A server running one of the following operating systems: Ubuntu 22.04, 20.04, and any other Debian-based distribution like Linux Mint.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for Apache CouchDB.
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install Apache CouchDB on Ubuntu 22.04 LTS Jammy Jellyfish
Step 1. First, make sure that all your system packages are up-to-date by running the following apt
commands in the terminal.
sudo apt update sudo apt upgrade
Step 3. Installing Apache CouchDB on Ubuntu 22.04.
By default, Apache CouchDB packages are not available in the default Ubuntu 22.04 repository, so you need to add the CouchDB repository to your system. Run the following command to add the Icinga repository:
echo "deb [signed-by=/usr/share/keyrings/couchdb-archive-keyring.gpg] https://apache.jfrog.io/artifactory/couchdb-deb/ jammy main" | sudo tee /etc/apt/sources.list.d/couchdb.list >/dev/null
Next, add the GPG key using the following command:
curl https://couchdb.apache.org/repo/keys.asc | gpg --dearmor | sudo tee /usr/share/keyrings/couchdb-archive-keyring.gpg >/dev/null 2>&1 source /etc/os-release
After adding the CouchDB repository, update your system and install the CouchDB package by running the following command:
sudo apt update sudo apt install couchdb
The first prompt asks for the type of CouchDB configuration:
┌─────────┤ Configuring couchdb ├─────────┐ │ General type of CouchDB configuration: │ │ │ │ standalone │ │ clustered │ │ none │ │ │ │ │ │ │ │ │ └─────────────────────────────────────────┘
For demonstration purposes, the standalone option is the way to go considering that the DB is installed in a single server.
Next, type in the interface IP address and continue:
┌─────────────────────────┤ Configuring couchdb ├──────────────────────────┐ │ A CouchDB node must bind to a specific network interface. This is done │ │ via IP address. Only a single address is supported at this time. │ │ │ │ The special value '0.0.0.0' binds CouchDB to all network interfaces. │ │ │ │ The default is 127.0.0.1 (loopback) for standalone nodes, and 0.0.0.0 │ │ (all interfaces) for clustered nodes. In clustered mode, it is not │ │ allowed to bind to 127.0.0.1. │ │ │ │ CouchDB interface bind address: │ │ │ │ 127.0.0.1_______________________________________________________________ │ │ │ │ │ │ │ └──────────────────────────────────────────────────────────────────────────┘
You can confirm the installation was successful and the service is running with the following command below:
curl http://127.0.0.1:5984/
After the installation is complete, you can start the CouchDB service by running the following command:
sudo systemctl enable couchdb sudo systemctl start couchdb
Step 4. Accessing Apache CouchDB Web Interface.
Once you’ve installed and configured Apache CouchDB, it’s time to verify that it’s running properly. You can do this by accessing the CouchDB web interface at http://localhost:5984/_utils/
. If everything is running fine, you’ll see a login screen.
Congratulations! You have successfully installed CouchDB. Thanks for using this tutorial for installing Apache CouchDB open-source non-relational database on Ubuntu 22.04 LTS Jammy Jellyfish system. For additional help or useful information, we recommend you check the Apache website.