Last active
March 16, 2016 20:37
-
-
Save yblee85/832b82999a00768c28e7 to your computer and use it in GitHub Desktop.
Install CouchDB 1.6.1 on Ubuntu 14.04 (origin : pixelpark/ppnet)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# via http://wiki.apache.org/couchdb/Installing_on_Ubuntu | |
sudo apt-get install --yes build-essential curl git | |
sudo apt-get install --yes python-software-properties python g++ make | |
sudo apt-get install -y erlang-dev erlang-manpages erlang-base-hipe erlang-eunit erlang-nox erlang-xmerl erlang-inets | |
sudo apt-get install -y libmozjs185-dev libicu-dev libcurl4-gnutls-dev libtool | |
# via http://ftp.fau.de/apache/couchdb/source/1.6.1/ | |
cd /tmp | |
wget http://ftp.fau.de/apache/couchdb/source/1.6.1/apache-couchdb-1.6.1.tar.gz | |
tar xvzf apache-couchdb-* | |
cd apache-couchdb-* | |
./configure && make | |
sudo make install | |
useradd -d /var/lib/couchdb couchdb | |
chown -R couchdb: /var/lib/couchdb /var/log/couchdb | |
# vi /etc/passwd here and change home directory to /usr/local/var/lib/couchdb/ | |
chown -R couchdb: /usr/local/var/{lib,log,run}/couchdb /usr/local/etc/couchdb | |
chmod 0770 /usr/local/var/{lib,log,run}/couchdb/ | |
chmod 664 /usr/local/etc/couchdb/*.ini | |
chmod 775 /usr/local/etc/couchdb/*.d | |
cd /etc/init.d | |
ln -s /usr/local/etc/init.d/couchdb couchdb | |
/etc/init.d/couchdb start | |
update-rc.d couchdb defaults | |
curl http://127.0.0.1:5984/ | |
# vi /usr/local/etc/couchdb/default.ini | |
# change bind_adress to 0.0.0.0 | |
service couchdb restart | |
============================================================= | |
after installation, | |
you can modify /var/local/etc/local.ini | |
and if you want to port forwarding to listen to port 80 | |
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 5984 | |
// to make it permanent | |
apt-get install iptables-persistent | |
iptables-save > /etc/iptables/rules.v4 (may not need) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in case you can't install earlang stuff
sudo apt-get install -y erlang-base erlang-dev erlang-nox erlang-eunit
in case you can't install libmozjs185 ....
add "deb http://archive.ubuntu.com/ubuntu trusty main restricted multiverse universe"
to /etc/apt/sources.list