2.4. Installation on FreeBSD

2.4.1. Installation from ports

  1. cd /usr/ports/databases/couchdb
  2. make install clean

This will install CouchDB from the ports collection.

2.4.1.1. Start script

The following options for /etc/rc.conf or /etc/rc.conf.local aresupported by the start script (defaults shown):

  1. couchdb_enable="NO"
  2. couchdb_enablelogs="YES"
  3. couchdb_user="couchdb"

After enabling the couchdb rc service use the following command to start CouchDB:

  1. /usr/local/etc/rc.d/couchdb start

This script responds to the arguments start, stop, status, rcvar etc..

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

  • /usr/local/etc/couchdb/default.ini
  • /usr/local/etc/couchdb/local.ini
    Administrators should use default.ini as reference and only modify thelocal.ini file.

2.4.1.2. Post install

Your installation is not complete. Be sure to complete theSetupsteps for a single node or clustered installation.

In case the install script fails to install a non-interactive user “couchdb” tobe used for the database, the user needs to be created manually:

I used the pw command to add a user “couchdb” in group “couchdb”:

  1. pw user add couchdb
  2. pw user mod couchdb -c 'CouchDB, time to relax' -s /usr/sbin/nologin -d /var/lib/couchdb
  3. pw group add couchdb

The user is added to /etc/passwd and should look similar to the following:

  1. shell# grep couchdb /etc/passwd
  2. 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 andinstead use pw user mod or vipw. Make sure that the user has noshell, but instead uses /usr/sbin/nologin. The ‘*’ in the second field meansthat this user can not login via password authorization. For details useman 5 passwd.

原文: http://docs.couchdb.org/en/stable/install/freebsd.html