You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by "bill2@ezinvoice.com" <bi...@ezinvoice.com> on 2016/12/14 21:20:58 UTC
CouchDB 2.0 questions
I spent some time working on installing CouchDB 2.0 on a DigitalOcean VPS and I’ve got it up and running after binding the IP address in both the local.ini and default.ini and in the Fauxton Config app. Some of that seems redundant to me, and may well have been, but I could not get Fauxton to show up until I did the first two, and I couldn’t get a database to replicate until I made the IP change in the Fauxton config.
That’s just a few notes on what I’ve experienced, and not being very familiar with the details of that process I may have well made mistakes along the way. I have a few question though. 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?
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?
I’ll be moving an app I’m working on to the 2.0 server later today so I can start testing it, so I’m getting closer to the fun stuff!
Kindest Regards,
Bill Stephenson
Re: CouchDB 2.0 questions
Posted by Joan Touzet <wo...@apache.org>.
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