Apache CouchDB is a free and open source NoSQL based database management system. CouchDB is a single node database which can also be clustered to run on different servers. CouchDB uses HTTP protocol and JSON format for sending the data. Hence the database is compatible with all the software which supports this. It is very reliable and secure database management system and used by numerous web applications.
In this tutorial, we will be installing Apache CouchDB on CentOS 7 server.
CouchDB does not require any special hardware requirements. It can be installed on servers with a small amount of RAM to very large servers according to your needs. All the required dependencies will be installed throughout the tutorial. You will need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run sudo -i to switch to root user.
Before installing any package it is recommended that you update the packages and repository using the following command.
yum -y update
Once the system is updated, you will need to install some dependencies which are required to install CouchDB. Some of the dependencies are not available on default YUM repository, hence you will need to install EPEL repository also. Run the following command for same.
yum -y install epel-releaseyum -y update
You can install the dependencies using the following command.
You can now access the admin panel using the following link.
To check if everything has installed correctly, you can access the following link.
If you want CouchDB instance to start automatically, you can setup Systemd service. It is recommended to create a systemd service for running CouchDB so that it can run in the background and can be automatically started on failures and boot time. Run the following command to create a systemd service file.
If you do not have nano installed, you can run yum -y install nano. Now paste the following text into the nano editor.
Now you can start CouchDB service and configure it to automatically start at boot time using following commands.
systemctl start couchdbsystemctl enable couchdb
To check if CouchDB service is started correctly, you can run the following command to check the status of the CouchDB service.
systemctl status couchdb You should get output similar to shown below.
[root@liptan-pc ]# systemctl status couchdb
● couchdb.service - CouchDB service
Loaded: loaded (/etc/systemd/system/couchdb.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2017-05-12 11:28:59 UTC; 8s ago
Main PID: 6354 (beam)
├─6354 /home/couchdb/couchdb/bin/../erts-5.10.4/bin/beam -K true -A 16 -Bd -- -root /home/couchdb/couchdb/bin...
├─6381 sh -s disksup
May 12 11:28:59 liptan-pc couchdb: [info] 2017-05-12T11:28:59.700471Z couchdb@localhost <0.7.0> --------...lhost
By default the server will listen to localhost on port 5984 only, if you want your CouchDB instance to be accessed from everywhere you will need to edit the CouchDB configuration file, run the following command to open the configuration file with nano editor.
Find the following lines into the file:
;port = 5984
;bind_address = 127.0.0.1
Uncomment the lines and change the lines as shown below.
port = 5984
bind_address = 0.0.0.0
Now restart the CouchDB service.
systemctl restart couchdb
Now you will need to disable your SELinux because reverse proxy does not work with SELinux policies. To temporary disable SELinux without restarting the server, run the following command.
To completely disable the SELinux you will need to edit /etc/selinux/config file.
If you don't have nano installed, you can install it using yum -y install nano Find the following line:
Change it to:
Now you will need to reboot your server so that the new configuration can take effect. Once the server is up again you can access your application at the following URL.
In this tutorial, we learned to install CouchDB on CentOS 7. You can now use CouchDB to create and store data in NoSQL database. Make sure that you create an admin user by clicking Admin Party! option from the sidebar.
If you find your cPanel disk space filling up, or an email address has hit its disk space quota, cPanel has a helpful built in Email Disk Usage tool. This will provide you with a simple to understand breakdown of how much disk space each folder for a particular email...
Although WHM will normally automatically keep itself up to date, you may want to manually check for server updates / push through an update that is pending, or it may be that you have automatic updates switched off on your cPanel server. In this guide we will show you how...
You may sometimes need to manually adjust the PHP settings on your cPanel server – for example if a site is hitting the PHP memory, or file size upload limit. WHM allows you to quickly change the settings of any PHP version installed on the server when needed, using the...