YouTube Icon

Code Playground.

How to Install CouchDB on CentOS 7

CFG

How to Install CouchDB on CentOS 7

Apache CouchDB is a free and open-source NoSQL information base created by the Apache Software Foundation. 

CouchDB worker stores its information in named data sets which contains archives with JSON structure. Each archive comprises of various fields and connections. Fields can incorporate content, numbers, records, booleans, more. It incorporates a RESTful HTTP API that permits you to peruse, make, alter and erase information base archives. 

In this instructional exercise, we will disclose how to introduce the most recent form of CouchDB on CentOS 7. 

Prerequisites

To have the option to put in new bundles on your CentOS framework, you should be signed in as a client with sudo advantages . 

Enable CouchDB Repository

The CouchDB store relies upon the EPEL storehouse . On the off chance that the EPEL archive isn't empowered on your framework, empower it by composing:. 

sudo yum install epel-release

Next, open your proofreader of decision and make the CouchDB archive document: 

sudo nano /etc/yum.repos.d/bintray-apache-couchdb-rpm.repo

Glue the accompanying substance into the record: 

/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

Spare the record and close the manager. 

Install CouchDB on CentOS

Since the archive is empowered, you can introduce the CouchDB bundles utilizing the accompanying order: 

sudo yum install couchdb

When the establishment is finished, empower and start the CouchDB administration: 

sudo systemctl start couchdb
sudo systemctl enable couchdb

Of course, CouchDB tunes in on localhost just and no administrator account is made. 

Apache CouchDB information and arrangement documents are put away in the/pick/couchdb catalog. To make an administrator account open the local.ini document and add a line under the [admins] area in the configuration username = secret phrase. 

sudo nano /opt/couchdb/etc/local.ini

/opt/couchdb/etc/local.ini

[admins]
admin = mysecretpassword

Change the secret key to a hash, by restarting the CouchDB administration: 

sudo systemctl restart couchdb

Utilize a similar configuration to add different administrator accounts. You'll have to restart the CouchDB administration subsequent to adding another record. 

Use twist to make the framework information bases: _users, _replicator and _global_changes: 

curl -u ADMINUSER:PASS -X PUT http://127.0.0.1:5984/_users
curl -u ADMINUSER:PASS -X PUT http://127.0.0.1:5984/_replicator
curl -u ADMINUSER:PASS -X PUT http://127.0.0.1:5984/_global_changes

Each order should restore the accompanying: 

{"ok":true}

Verifying CouchDB Installation

To check whether the establishment was performed effectively, issue the accompanying twist order that will print the CouchDB information base data in JSON design: 

curl http://127.0.0.1:5984/

For lucidity the yield beneath is designed. 

{  
   "couchdb":"Welcome",
   "version":"2.3.1",
   "git_sha":"c298091a4",
   "uuid":"17a6b911e0d5bfe36778b387510dbd93",
   "features":[  
      "pluggable-storage-engines",
      "scheduler"
   ],
   "vendor":{  
      "name":"The Apache Software Foundation"
   }
}

On the off chance that you favor GUI, you can get to the CouchDB online interface, Fauxton at: 

http://127.0.0.1:5984/_utils/

Conclusion

You have figured out how to introduce CouchDB CentOS 7. Your following stage could be to visit the Apache CouchDB Documentation and discover more data on this subject. 

Don't hesitate to leave a remark in the event that you have any inquiries.




CFG