• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Install Apache CouchDB on CentOS/RHEL 7/6

Written by Rahul, Updated on November 10, 2017

CouchDB is an open source project and NoSQL, document oriented database server. It stored data with JSON documents. It also provides web interface to access documents online. Click here to read more details about CoutchDB

This tutorial will help you to install Apache CouchDB server on CentOS, RedHat 7/6 servers.

Step 1 – Enabel Yum Repositories

First of all, use below command to install EPEL yum repository on your system. In case epel repository package not found, use this tutorial to install epel package.

yum install epel-release-7-11.noarch.rpm

Now create yum repository for Apache Couchdb. Create a file /etc/yum.repos.d/apache-couchdb.repo file using the below content.

[bintray--apache-couchdb-rpm]
name=Apache-couchdb
baseurl=http://apache.bintray.com/couchdb-rpm/el$releasever/$basearch/
gpgcheck=0
repo_gpgcheck=0
enabled=1

Step 2 – Install Apache CouchDB Package

Install CouchDB package using yum command line tool. It will also install many more dependencies on your system.

yum install couchdb    

Step 3 – Configure CouchDB

By default, CouchDB runs on port 5984 and will be accessible to localhost only. To make it available on network system edit CouchDB config file /opt/couchdb/etc/local.ini and update following values.

vim /opt/couchdb/etc/local.ini

Navigate to [chttpd] section and update port and bind_address as per system. Set 0.0.0.0 to bind address to make is accessible with every enterface.

[chttpd]
port = 5984
bind_address = 192.168.10.30

Navigate to the end of this file and set the admin user and password. As per below settings we use admin as the username with password secret.

[admins]
admin = secret

Restart CouchDB service after changing the password every time. CouchDB will encode this password.

Step 4 – Start CouchDB Service

Start CouchDB service using following commands and also configure to autostart on system boot.

### on CentOS/RHEL 7 ### 
systemctl enable couchdb.service
systemctl start couchdb.service

### on CentOS/RHEL 6 ### 
service couchdb start
chkconfig couchdb on

CouchDB will start on port 5984 and will be accessible through a browser.

Step 5 – Create Database in CouchDB

Now, create your first database on CouchDB server. For example, your CouchDB server ip is 192.168.10.20. First set the HOST variable with following details. This will make other commands to run easily. After that use curl to create a database.

HOST="http://admin:[email protected]:5984"
curl -X PUT $HOST/mydb

{"ok":true}

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

2 Comments

  1. Avatar Frank Reply
    August 30, 2019 at 1:26 pm

    if that can help anybody, I run the command to install like that:

    sudo yum -y install epel-release && sudo yum -y install couchdb

    And it solved the js conflict.

  2. Avatar Frank Reply
    August 30, 2019 at 1:12 pm

    Hello, I am getting the following conflict, any Idea?

    Installing:
    couchdb x86_64 2.3.1-1.el6 bintray–apache-couchdb-rpm 19 M
    Installing for dependencies:
    couch-js x86_64 1:1.8.5-21.el6 bintray–apache-couchdb-rpm 1.8 M

    Transaction Summary
    ================================================================================
    Install 2 Package(s)

    Total size: 21 M
    Installed size: 46 M
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    ERROR with rpm_check_debug vs depsolve:
    js <= 1.8.5 conflicts with couch-js-1:1.8.5-21.el6.x86_64
    You could try running: rpm -Va –nofiles –nodigest
    Your transaction was saved, rerun it with:
    yum load-transaction /tmp/yum_save_tx-2019-08-30-15-10o2ED_x.yumtx

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy