Skip to content

Instantly share code, notes, and snippets.

@nickva
Last active October 4, 2018 18:35
Show Gist options
  • Save nickva/3b591654a523613e191463c5030406db to your computer and use it in GitHub Desktop.
Save nickva/3b591654a523613e191463c5030406db to your computer and use it in GitHub Desktop.
CouchDB 2.2 setup CentOS 7
# Verify
$ gpg --verify apache-couchdb-*.tar.gz.asc
$ sha256sum --check apache-couchdb-*.tar.gz.sha256
$ sha512sum --check apache-couchdb-*.tar.gz.sha512
# Set max files limits
$ sudo emacs /etc/security/limits.conf
(add)
* hard nofile 100000
* soft nofile 100000
root hard nofile 100000
root soft nofile 100000
$ sudo emacs /etc/pam.d/common-session
(add)
session required pam_limits.so
$ sudo emacs /etc/sysctl.d/99-sysctl.conf
(add)
fs.file-max = 100000
$ sudo sysctl -p /etc/sysctl.conf
$ sudo sysctl -w fs.file-max=100000
$ sudo sysctl --system
# Log out then log back in for the session settings to take effect
# Install Erlang 20
$ sudo yum remove 'erlang*'
$ sudo rpm --import https://packages.erlang-solutions.com/rpm/erlang_solutions.asc
$ wget https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_20.3.6-1~centos~7_amd64.rpm
$ sudo rpm -i esl-erlang_20.3.6-1~centos~7_amd64.rpm
# Install CouchDB's spidermonkey
$ sudo yum remove js js-devel js-debuginfo
$ cat > 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
$ sudo mv bintray-apache-couchdb-rpm.repo /etc/yum.repos.d/
$ sudo yum -y install epel-release
$ sudo yum -y install couch-js
$ sudo yum -y install couch-js-devel
# Install Mango (Query) test dependencies (only need to run tests)
$ sudo yum install python2-hypothesis python-nose python-requests
# Build
$ tar -xvzf apache-couchdb-2.2.0-RC1.tar.gz
$ cd apache-couchdb-2.2.0/
$ ./configure -c
$ make
# Run Tests
$ make check
# Release
$ make release
# Run
./rel/couchdb/bin/couchdb
# Test Fauxton
$ firefox http://127.0.0.1:5984/_utils
# Create admin user. Run verify installation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment