Monday, June 4, 2012

Installing Couchdb 1.2 on Ubuntu 12.04 server

Helpful links: http://cvee.github.com/blog/2011/11/28/configuring-couchdb-on-ubuntu/

1) install git
apt-get install git

2) make directory for source
mkdir /data/couchdb_source

3) put source files into directory
cd /data/couchdb_source
git clone http://git-wip-us.apache.org/repos/asf/couchdb.git

4) change branch to version you need. We will be checking out 1.2.0
cd /data/couchdb_source/couchdb
git checkout 1.2.0
5) Install dependencies needed to build couchdb
sudo apt-get -y install build-essential autoconf automake libtool erlang libicu-dev libmozjs-dev libcurl4-openssl-dev
6) Build the configure and make files
./bootstrap
./configure --prefix=/data/couchdb
make && sudo make install
7) Create a user account dedicated for CouchDB and update permissions
sudo adduser --system --home /data/couchdb/var/lib/couchdb --no-create-home --shell /bin/bash --group --gecos "CouchDB Administrator" couchdb
sudo chown -R couchdb:couchdb /data/couchdb
sudo chmod 0770 -R /data/couchdb
8) Update Admin pass
/data/couchdb/etc/couchdb/local.ini
Change:
[admins]
root = [PASS]
9) Make it so couchdb will startup automatically
sudo cp /data/couchdb/etc/init.d/couchdb /etc/init.d
sudo update-rc.d couchdb defaults
10) Update Couchdb Config settings
nano /data/couchdb/etc/couchdb/default.ini
a) set delayed_commits - false
b) set reduce_limit - false

 11) Open firewall
iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 5984 -j ACCEPT
iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 6984 -j ACCEPT

12) Start Couchdb
service couchdb start

1 comment:

  1. Have you seen an build problem as a result of the deprecation of SSHv2 in OpenSSL 1.x.x?

    There are calls made to OpenSSL SSHv2 methods that no longer exist.

    ReplyDelete

Phoenix

I am resurrecting this tech blog for notes related to Azure Logic Apps with SAP.