Hi Bill, thanks for writing.

----- Original Message -----
> I looked for
> how to start and restart CouchDB and I found this command in the
> docs to start the server:
> 
>       sudo -i -u couchdb couchdb/bin/couchdb
> 
> And I found many references in the docs instructing when to “restart"
> the server, but nowhere did I find a command for that specifically.
> I’m left guessing that I use the command above to do that. Did I
> miss something?

CouchDB has no "shutdown" command; it's designed to be crash-safe, so
you can simply run:

        sudo killall couchdb

and then restart it using the command you highlight above.

> I’m starting the server from a remote terminal and CouchDB quits
> running when I end that session, or the session times out. How do I
> need to start it, or what do I need to configure to keep it running
> and start on boot?

That's OS dependent. There are many techniques to auto-start CouchDB
on boot and to ensure it stays running. upstartd or systemd can take
care of this for you, but my (and Cloudant's) favourite is to use runit:

http://smarden.org/runit/

The documentation is simple, but basically you install runit (NOT using
it to replace init), then create a run script for couchdb that mirrors
the command you're using above. A simple sv run script might be:

#!/bin/bash
chpst -u couchdb /path/to/couchdb/bin/couchdb

Good luck! Do report back and let us know how it goes.

-Joan

Reply via email to