couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Installing on FreeBSD" by TillKlampaeckel
Date Fri, 15 May 2009 01:23:31 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by TillKlampaeckel:
http://wiki.apache.org/couchdb/Installing_on_FreeBSD

The comment on the change is:
small edits, added howto create a user/group, etc.

------------------------------------------------------------------------------
  
  We then need to setup a couchdb user:
  
- I used the {{{adduser}}} command to add a user "couchdb" in group "couchdb".
+ 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 in {{{/etc/passwd}}} should look similar to the following:
+ The user is created in {{{/etc/passwd}}} should look similar to the following:
  {{{
+ shell# cat /etc/passwd |grep couchdb
  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 ...}}}. Make sure that the user has no shell, but instead uses {{{/usr/sbin/nologin}}}.
  
- == start script ==
+ == Start script ==
  
  On FreeBSD, you use the following to start CouchDB:
  {{{
- /usr/local/etc/rc.d/couchdb
+ shell# /usr/local/etc/rc.d/couchdb
  }}}
  
  This script provides the options start, stop, status, rcvar etc..
  
  There's currently no start script included in the port, but a work in progress of the maintainer
can be downloaded from [http://github.com/till/couchdb-freebsd/blob/20e20e748339b42e1e5ca6e04c9224ad09ea2557/rc-script/couchdb
github].
  
- This start script currently supports the following options for {{{/etc/rc.conf}}}/{{{/etc/rc.conf.local}}}:
+ This start script currently supports the following options for {{{/etc/rc.conf}}} or {{{/etc/rc.conf.local}}}:
  {{{
  couchdb_enable="NO"
  couchdb_enablelogs="YES"
@@ -55, +61 @@

  
  For this to work I used a 
  {{{
- chown couchdb:couchdb /var/log/couchdb
+ shell# chown couchdb:couchdb /var/log/couchdb
  }}}
  command to have the couchdb process own the directory which allows it to write couch.log
there. Again I am not happy with this solution. The other directories are "root:wheel" or
"root:network". And I expected "/usr/local/var.." as location.
  
  Starting CouchDB with
  {{{
- /usr/local/etc/rc.d/couchdb start
+ shell# /usr/local/etc/rc.d/couchdb start
  }}} 
  should allow you to look at "http://localhost:5984" and see this JSON doc:
  {{{
@@ -71, +77 @@

  
  I tried creating a database "db1" there and got an error. The solution was to
  {{{
- chown couchdb:couchdb /var/lib/couchdb
+ shell# chown couchdb:couchdb /var/lib/couchdb
  }}}
- and yes, this does not really feel FreeBSD style. And indeed "/usr/local/var/couchdb" might
be more appropriate too. :-)
  
  Anyway, after this futon did report OK and I found a "/var/lib/couchdb/db1.couch" data file.
  

Mime
View raw message