Print this page and how many following pages?

 


 

CouchDB

Installing CouchDB 1.2.0 on Ubuntu 10.04


Lines starting with $ should be typed into a Bash console.
Other lines are either the contents of a file you need to edit, or are continuations of the line above.

Install the prerequisites

$ sudo apt-get build-dep couchdb
$ sudo apt-get install xulrunner-1.9.2-dev libicu-dev libcurl4-gnutls-dev libtool erlang-eunit erlang-nox
$ sudo vim /etc/ld.so.conf.d/xulrunner.conf

/usr/lib/xulrunner-1.9.2.17
/usr/lib/xulrunner-devel-1.9.2.17

$ sudo /sbin/ldconfig


Build CouchDB

Create and/or change directory to where you want to do the building, then...
$ wget http://www.gtlib.gatech.edu/pub/apache/couchdb/releases/1.2.0/apache-couchdb-1.2.0.tar.gz
$ tar -zxf apache-couchdb-1.2.0.tar.gz 
$ cd apache-couchdb-1.2.0/
$ ./configure
$ make


Install CouchDB

This does the install, it executes make install and makes a deb of what was installed - which is handy if you want to install the same build elsewhere, or remove the build.
$ sudo checkinstall \
	--pkgname=couchdb \
	--pkgversion="1.2.0" \
	--backup=no \
	--deldoc=yes \
	--fstrans=no \
	--default


Configure CouchDB

Unfortunately the build only allows CouchDB to be run as root. We want to run CouchDB as the user couchdb, so some changes have to be made.
$ sudo useradd --disabled-login --disabled-password --no-create-home couchdb
$ sudo chown -R couchdb: /usr/local/var/{lib,log,run}/couchdb /usr/local/etc/couchdb
$ sudo chmod 0770 /usr/local/var/{lib,log,run}/couchdb/
$ sudo chmod 664 /usr/local/etc/couchdb/*.ini
$ sudo chmod 775 /usr/local/etc/couchdb/*.d
$ sudo ln /usr/local/etc/init.d/couchdb /etc/init.d/couchdb
$ sudo update-rc.d couchdb defaults


Start and test CouchDB

$ sudo service couchdb start
$ curl http://127.0.0.1:5984/


Installing CouchDB 1.2.0 on Mac OS X


Simple


Got to http://couchdb.apache.org/, download the Mac OS X application, and run it.

Harder - Install a service with MacPorts


Use the typical install method of MacPorts.
$ sudo port selfupdate
$ sudo port install couchdb
$ sudo port upgrade couchdb


Set CouchDB to run as a service, and start the service
sudo launchctl load -w /opt/local/Library/LaunchDaemons/org.apache.couchdb.plist


Or stop remove the service.
sudo launchctl unload -w /opt/local/Library/LaunchDaemons/org.apache.couchdb.plist


For CouchDB 1.3, this is how you start the database
sudo port load couchdb

VeryQuickWiki Version 2.8.1 | Admin

All contents copyright mdsh.com (C) 2011-2023.