A straight-forward Bash script to install and configure CouchDB 2.2.0 on Ubuntu 18.04 Bionic Beaver 64-bit.
The old script, to install CouchDB 2.1.0 on Ubuntu 16.04 Xenial Xerus
- Upgrades apt and updates packages.
- Installs the official CouchDB package.
- Sets up CouchDB as a service that runs on system startup.
- Creates the "couchdb" system user.
- Checks CouchDB installation.
Download the couchdb-install file and run it:
sudo ./couchdb-install
or, with unnatended option enabled:
sudo ./couchdb-install -y
The script will guide you further.
Options (flags):
-y
: Don't prompt for confirmation upon running the install.
Tested on Ubuntu 18.04 Bionic Beaver 64-bit only, but it may work on other version of Debian-based systems.
The script is based on information from the official docs and other sources:
- http://docs.couchdb.org/en/2.0.0/install/unix.html
- http://docs.couchdb.org/en/2.0.0/install/
- http://docs.couchdb.org/en/2.0.0/cluster/nodes.html
- https://www.jamescoyle.net/how-to/2527-add-systemd-startup-script-for-couchdb
- http://stackoverflow.com/a/40409701
Error handling is not airtight. Some post-failure messages may not be very helpful.