Differences between revisions 20 and 21
Revision 20 as of 2011-11-23 14:30:44
Size: 3986
Editor: JanLehnardt
Comment: add ContributorGroup link
Revision 21 as of 2014-08-10 12:35:52
Size: 115
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
= Installing CouchDB on FreeBSD 6.x and 7.x and 8.0 =
== Installation from ports ==
cd /usr/ports/databases/couchdb
make install clean
This will install CouchDB 0.10.1 from the ports collection.

== Post install ==
In case the install script fails to install a noninteractive user "couchdb" to be used for the database, the user needs to be created manually:

I used the {{{pw}}} command to add a user "couchdb" in group "couchdb":

shell# pw user add couchdb
shell# pw user mod couchdb -c 'CouchDB, time to relax' -s /usr/sbin/nologin -d /var/lib/couchdb
shell# pw group add couchdb
The user is added to {{{/etc/passwd}}} and should look similar to the following:

shell# grep couchdb /etc/passwd
couchdb:*:1013:1013:Couchdb, time to relax:/var/lib/couchdb/:/usr/sbin/nologin
To change any of these settings, please refrain from editing {{{/etc/passwd}}} and instead use {{{pw user mod ...}}} or {{{vipw}}}. Make sure that the user has no shell, but instead uses {{{/usr/sbin/nologin}}}. The '*' in the second field means that this user can not login via password authorization. For details use {{{man 5 passwd}}}.

== Start script ==
On FreeBSD, you use the following to start CouchDB:

shell# /usr/local/etc/rc.d/couchdb start
This script responds to the arguments start, stop, status, rcvar etc..

The following options for {{{/etc/rc.conf}}} or {{{/etc/rc.conf.local}}} are supported by the start script:

(Defaults shown.)

The start script will also use settings from the following config files:

Administrators should use default.ini as reference and only modify the local.ini file.

The logfile is configured to be written to

In case the port does not set up correct permissions on the database directory, a command analogous to the following should be used:

shell# chown couchdb:couchdb /var/log/couchdb
shell# chown couchdb:couchdb /usr/local/lib/couchdb/erlang/lib/couch-0.10.1/priv/lib
command to have the couchdb process own the directory which allows it to write couch.log there. The other directories are "root:wheel" or "root:network". And I expected "/usr/local/var.." as location.

Starting CouchDB with

shell# /usr/local/etc/rc.d/couchdb start
should allow you to look at "http://localhost:5984" and see this JSON doc:

Then you should try "http://localhost:5984/_utils/" to see the "Futon" web interface,

I tried creating a database "db1" there and got an error. The solution was to

shell# chown couchdb:couchdb /var/lib/couchdb
Anyway, after this futon did report OK and I found a "/var/lib/couchdb/db1.couch" data file.

== Installing from sources ==
When building from sources obtained from {{{git clone git://github.com/halorgium/couchdb.git}}}, you can get a strange "{{{Syntax error: end of file unexpected}}}". You need to use {{{gmake}}} instead of {{{make}}}.

If you get {{{aclocal: not found}}} on {{{./bootstrap}}} you need to {{{pkg_add -r automake19}}}.

If you get {{{libtoolize: not found}}} on {{{./bootstrap}}} you need to {{{pkg_add -r libtool}}}.

If you get {{{error: Could not find the js library}}} on {{{./configure}}} you need to {{{pkg_add -r spidermonkey}}}.

If you get {{{error: Library requirements (ICU) not met}}} on {{{./configure}}} you need to {{{pkg_add -r icu}}}.

If you get {{{error: Library requirements (curl) not met}}} on {{{./configure}}} you need to {{{pkg_add -r curl}}}.

= Current TODO =
 * Change /var/lib/couchdb/ to /var/db/couchdb/
 * Create /var/log/couchdb/
 * Create a couchdb user with port install

= Questions? =
Please check out the github repository, or email TillKlampaeckel.
This content has moved to https://cwiki.apache.org/confluence/display/COUCHDB/FreeBSD

We have a new wiki. The migration is not 100% complete. You can help out by moving pages across. This wiki will exist for as long as there are pages left.

The official documentation has moved to http://docs.couchdb.org — The transition is not 100% complete, but http://docs.couchdb.org should be seen as having the latest info. In some cases, the wiki still has some more or older info on certain topics inside CouchDB.

You need to be added to the ContributorsGroup to edit the wiki. But don't worry! Just email any Mailing List or grab us on IRC and let us know your user name.

This content has moved to https://cwiki.apache.org/confluence/display/COUCHDB/FreeBSD

Installing_on_FreeBSD (last edited 2014-10-06 12:07:52 by DaveCottlehuber)