I have installed CouchDB 1.6.1 on a Trusty box via the Apache CouchDB PPA (couchdb/stable
). This all seems to work, except that I cannot start the service using service couchdb start
(similarly for stop). I've got around this by putting the following script in /usr/local/bin
:
#!/bin/bash
export ERL_FLAGS="+A 16"
export ERL_MAX_PORTS=8192
nohup couchdb > /opt/couchdb/log/couch.log 2>&1 &
I have to run this manually (or stop it with kill
). The service
commands say they work, but CouchDB just immediately fails. This is fine, except in the rare event that the machine needs rebooting; it would be nice if CouchDB came up automatically.
On various pages I've found online, there is reference to a bundled init.d
script. In fact, I found a generated init.d
script, which is supposed to be installed along with CouchDB: I tried this, edited appropriately, but the same problem persists.
It seems a lot of the documentation I've found online is very out-of-date (e.g., it references paths that are not valid with the PPA installed version and/or Trusty). What is the current "best way to do this"?