Linux

How to Install CouchDB on Ubuntu 20.04

How to Install CouchDB on Ubuntu 20.04

Apache CouchDB is a free and open-source NoSQL database developed by the Apache Software Foundation. This can be used as a single node or clustered database.

The CouchDB server stores its data in a named database, which contains documents with a JSON structure. Each document consists of a number of fields and appendices. Columns can include text, numbers, lists, booleans and more. CouchDB includes a RESTful HTTP API that allows you to read, create, edit and delete database documents.

This article covers steps for installing the latest version of CouchDB on Ubuntu 20.04.

Installing CouchDB on Ubuntu is relatively easy. We will activate the CouchDB APT repository, import the GPG key repository, and install the CouchDB package.

Activate the CouchDB repository#

Run the following command as root or a user with sudo rights to activate the CouchDB repository and import the GPG key:

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

Install CouchDB on Ubuntu

After the repository is activated, update the package list and install CouchDB:

sudo apt update
sudo apt install couchdb

The installer will ask if you want to install CouchDB in clustered or standalone mode. Cluster means multiple servers that are connected together, working as a single distributed data store.

We will install CouchDB in standalone single server mode.

1(9)

Next, you will be given the option to set the IP address of the network interface where CouchDB will bind. For single server settings, leave 127.0.0.1 default. If you are configuring a cluster, enter the interface IP address or type 0.0.0.0, which tells CouchDB to bind to all network interfaces.

2(8)

At the next prompt, set the admin password. It is recommended to set a password, which will remove CouchDB from “admin party” mode which is not secure. If you leave this field blank, the admin user will not be created.

3(7)

Finally, confirm the password, and CouchDB installation will continue.

4(6)

Verifying the CouchDB Installation

The CouchDB server runs on localhost: 5984. To verify whether the installation is successful and the service is running, run the following curl command that will print information about the CouchDB database in JSON format:

curl http://127.0.0.1:5984/

The output will look like this:

Output
{
  "couchdb":"Welcome",
  "version":"3.1.0",
  "git_sha":"ff0feea20",
  "uuid":"4589130c33b0dae4c166330463542ad4",
  "features":[
    "access-ready",
    "partitioned",
    "pluggable-storage-engines",
    "reshard",
    "scheduler"
  ],
  "vendor":{
    "name":"The Apache Software Foundation"
  }
}

For clarity the above output is formatted.

If you prefer a GUI, you can access the CouchDB, Fauxton web-based interface at:

http://127.0.0.1:5984/_utils/

5(7)

Conclusion

We have shown you how to install CouchDB on Ubuntu 20.04. You can find more information about this topic in the Apache CouchDB Documentation.

Related posts

How to make Ubuntu look like Windows XP

Windows

How to Install WordPress with Nginx on Ubuntu 20.04 LTS

Linux

How to Get Windows Terminal Fonts (Cascadia Code) on an Ubuntu Terminal

Linux

How to Install the Google Chrome Web Browser on Ubuntu 20.04

Linux

How to Install a Plex Media Server on Ubuntu 20.04 / Linux Mint 20

Linux

How to Install and Configure Fail2ban on Ubuntu 20.04

Linux

How to Install Joomla with Apache2 and Let’s Encrypt on Ubuntu 20.04

Linux

How to install Linux Kernel 5.7 on Ubuntu

Linux

Tutorial mktemp Linux Commands for Beginners (5 Examples)

Howto