Skip to content

Instantly share code, notes, and snippets.

@wmealing
Created May 3, 2016 14:13
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save wmealing/545e9880c8415a010b5f747a4fa965b2 to your computer and use it in GitHub Desktop.
Save wmealing/545e9880c8415a010b5f747a4fa965b2 to your computer and use it in GitHub Desktop.
centos7 / rhel7 install instructions for couchdb.
#!/bin/bash
# Move to a location where you don't mind storing the couchdb install files.
cd /tmp/
EPEL_FILE=epel-release-latest-7.noarch.rpm
COUCH=apache-couchdb-1.6.1.tar.gz
rm -rf epel-release-latest-7.noarch.rpm
# Enable EPEL and REMI repositories for installing couchdb deps.
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh epel-release-latest-7.noarch.rpm
# Install couchdb dependencies.
yum install autoconf autoconf-archive automake libtool perl-Test-Harness erlang libicu-devel js-devel curl-devel gcc-c++
# Download and install couchdb.
wget http://apache.mirror.digitalpacific.com.au/couchdb/source/1.6.1/apache-couchdb-1.6.1.tar.gz
tar -xzf $COUCH
cd apache-couchdb-1.6.1
./configure --with-erlang=/usr/lib64/erlang/usr/include
make && make install
# Add couchdb user and proper file ownership and permissions.
adduser -r --home /usr/local/var/lib/couchdb -M --shell /bin/bash --comment "CouchDB Administrator" couchdb
chown -R couchdb:couchdb /usr/local/etc/couchdb
chown -R couchdb:couchdb /usr/local/var/lib/couchdb
chown -R couchdb:couchdb /usr/local/var/log/couchdb
chown -R couchdb:couchdb /usr/local/var/run/couchdb
chmod 0770 /usr/local/etc/couchdb
chmod 0770 /usr/local/var/lib/couchdb
chmod 0770 /usr/local/var/log/couchdb
chmod 0770 /usr/local/var/run/couchdb
# If you want to start couchdb as a daemon on boot.
ln -s /usr/local/etc/rc.d/couchdb /etc/init.d/couchdb
chkconfig --add couchdb
chkconfig --level 345 couchdb on
# get a list of active zones.. you might have more.
firewall-cmd --get-active-zones
# firewalld command to allow this port open to dmz
firewall-cmd --zone=public --add-port=5984/tcp --permanent
# Restart the firewalld service
firewall-cmd --reload
# Start couchdb as a daemon
/usr/local/etc/rc.d/couchdb start
Copy link

ghost commented May 22, 2016

Followed instructions above on rhel7. Get the following :beam/beam_load.c(1344): Error loading module compile: use of opcode 153; this emulator supports only up to 152 when executing line 24 above.
John.

@fewstera
Copy link

fewstera commented Nov 3, 2016

I also had to do
chown -R couchdb:couchdb /usr/local/lib/couchdb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment