1. Upgrade your system
Before you start installing CouchDB on your CentOS 7 server, it is recommended to upgrade all your system software to the latest version available. To do that you can use the following command:
# yum update
Make sure the EPEL repository is present on the server, if it is not, this command will install it:
# yum install epel-release
You can move to the next step once the EPEL repository has been installed.
2. Add Apache repository
We are going to install CouchDB now, in order to do that we must first add the Apache repository, use nano to open a file at the following path and add the contents below:
# nano /etc/yum.repos.d/bintray-apache-couchdb-rpm.repo [bintray--apache-couchdb-rpm] name=bintray--apache-couchdb-rpm baseurl=http://apache.bintray.com/couchdb-rpm/el$releasever/$basearch/ gpgcheck=0 repo_gpgcheck=0 enabled=1
3. Install Apache CouchDB
Now run the following command to install CouchDB:
# yum install couchdb
4. Configure Apache CouchDB
When the installation is finished, run the following commands to start and enable CouchDB on boot:
# systemctl start couchdb # systemctl enable couchdb
5. Verify if CouchDB service is running
Check if the CouchDB service is running:
# systemctl status couchdb ● couchdb.service - Apache CouchDB Loaded: loaded (/usr/lib/systemd/system/couchdb.service; enabled; vendor preset: disabled) Active: active (running) since Sun 2018-02-04 16:34:22 CST; 2min 33s ago Main PID: 1255 (beam.smp) CGroup: /system.slice/couchdb.service ├─1255 /opt/couchdb/bin/../erts-7.3/bin/beam.smp -K true -A 16 -Bd -- -root /opt/couchdb/bin/.. -progname couchdb -- -home /opt/couchdb -- -boot /opt/co... ├─1263 /opt/couchdb/bin/../erts-7.3/bin/epmd -daemon ├─1478 sh -s disksup ├─1480 /opt/couchdb/bin/../lib/os_mon-2.4/priv/bin/memsup └─1481 /opt/couchdb/bin/../lib/os_mon-2.4/priv/bin/cpu_sup
If you get the output above, Apache CouchDB has been installed and running on your server, you can proceed to the next step.
6. Enable Fauxton Web GUI Administration Panel
Fauxton is a web-based interface built into CouchDB. It provides a basic interface with the ability to manage documents, views and various configuration settings.
We are going to enable Fauxton by modifying the following file first:
# nano /opt/couchdb/etc/default.ini
Go to the ‘[chttpd]’ line and change the bind_address value with your server’s IP address:
[chttpd] ; These settings affect the main, clustered port (5984 by default). port = 5984 bind_address = 192.168.0.24
Restart CouchDB so the changes will take effect:
# systemctl restart couchdb
Now open the following URL using your server’s IP address in your web browser:
You should see the Fauxton Web GUI interface now.
7. Create an Administrator User in Fauxton
By default Apache CouchDB allows anyone to connect with administrator rights so we are going to add an administrator user through Fauxton, go to the following URL using your server’s IP address:
Then enter your desired administrator username and password and click on the ‘Create Admin’ button.
Now if you want to log in again the Fauxton Web GUI interface will ask you for your login credentials.
That’s it, if you got this far you should have successfully installed Apache CouchDB on your CentOS 7 server.
Of course, you don’t have to install Apache CouchDB on CentOS 7, if you use one of our Database VPS Hosting services in which case you can simply ask our expert Linux admins to install Apache CouchDB on CentOS 7 for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post, on how to install Apache CouchDB on your CentOS 7 server, please share it with your friends on the social networks using the buttons on the right or simply leave a reply below. Thanks.