Apache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang. CouchDB server stores its data in named databases, which contains documents with JSON structure.
It is optimized for multi-tasking functions. CouchDB has two modes, standalone mode, and clustered mode. If you are using a single server you can use standalone mode and if you are using more than one server, then you can use clustered mode.CouchDB server stores its data in named databases, which contains documents with JSON structure. Each document consists of a number of fields and attachments. Fields can include text, numbers, lists, booleans, more. CouchDB includes a RESTful HTTP API that allows you to read, create, edit, and delete database documents.
Install EPEL Repo
dnf install epel-release -y
Create and install CouchDB repository
Create couchdb.repo file using following command.
Now add below configuration in this file.
save changes to file and exit.
Install CouchDB on CentOS 8
Use following command to install CouchDB
dnf install couchdb -y
CouchDB Necessary Configuration
We are going to make couchdb configuration so that we can access it from any browser. Secondly, CouchDB can be configured in both clustered and Standalone mode. But, we gonna configure it in standalone mode.
We need to make changes in local.ini file located under /opt/couchdb/etc/ directory.
If you want to access your DB from external IP addresses, locate [chttpd] section. Uncomment the port and bind-address lines. Also, set the bind-address from 127.0.0.1 to 0.0.0.0 to allow access from external IP addresses.
port = 5984
bind_address = 0.0.0.0
Now locate [admins] section, uncomment the line admin = mypassword and set your desired password so that you can access admin account.
admin = mypassword
Start and enable CouchDB services
systemctl start couchdb
systemctl enable couchdb
systemctl status couchdb
Now to make Firewall Configurations
CouchDb listen on port 5984 so we must enable this port in firewall.
firewall-cmd --permanent --zone=public --add-port=5984/tcp
Access CouchDB Web Interface
CouchDB has been installed and configured, now verify that everyhting is going good regarding CouchDB.
Run below command to verify:
If everything is successful, you will see similar output.
Finally open your web browser, use following URL with your Server IP address and enter your admin login details to acces CouchDB.
After logging in you can create your databases.
Click on Create DataBase , type database name , click on Partitioned and then click on create option.
You can see your created Database.
You can check its permissions.