couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject documentation commit: updated refs/heads/master to 8898e51
Date Fri, 23 Sep 2016 09:19:22 GMT
Repository: couchdb-documentation
Updated Branches:
  refs/heads/master 027315252 -> 8898e51ca


Add an example of configuring runit to "Installation on Unix-like systems" article


Project: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/commit/8898e51c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/tree/8898e51c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/diff/8898e51c

Branch: refs/heads/master
Commit: 8898e51cac71a0f89624a7cc3f7bf182cf3d0446
Parents: 0273152
Author: Aleksander Alekseev <afiskon@gmail.com>
Authored: Fri Sep 23 10:17:22 2016 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Fri Sep 23 10:19:03 2016 +0100

----------------------------------------------------------------------
 src/install/unix.rst | 77 ++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 70 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/8898e51c/src/install/unix.rst
----------------------------------------------------------------------
diff --git a/src/install/unix.rst b/src/install/unix.rst
index c80df22..ca646d5 100644
--- a/src/install/unix.rst
+++ b/src/install/unix.rst
@@ -229,12 +229,75 @@ Running as a Daemon
 
 CouchDB no longer ships with any daemonization scripts.
 
-The couchdb team recommends `runit <http://smarden.org/runit/>`_ to
-run CouchDB persistently and reliably. Configuration of runit is
-straightforward; if you have questions, reach out to the CouchDB
-user mailing list.
+The CouchDB team recommends `runit <http://smarden.org/runit/>`_ to
+run CouchDB persistently and reliably. According to official site:
 
-Naturally, you can configure systemd, launchd or SysV-init daemons to
-launch CouchDB and keep it running using standard configuration files.
+    *runit* is a cross-platform Unix init scheme with service supervision,
+    a replacement for sysvinit, and other init schemes. It runs on
+    GNU/Linux, *BSD, MacOSX, Solaris, and can easily be adapted to
+    other Unix operating systems.
 
-Consult your system documentation for more information.
+Configuration of runit is straightforward; if you have questions, contact
+the CouchDB `user mailing list <http://mail-archives.apache.org/mod_mbox/couchdb-user/>`_
+or `IRC-channel #couchdb <http://webchat.freenode.net/?channels=#couchdb>`_
+in FreeNode network.
+
+Let's consider configuring runit on Ubuntu 16.04. The following
+steps should be considered only as an example. Details will vary
+by operating system and distribution. Check your system's package
+management tools for specifics.
+
+Install runit::
+
+    sudo apt-get install runit
+
+Create a directory where logs will be written::
+
+    sudo mkdir /var/log/couchdb
+    sudo chown couchdb:couchdb /var/log/couchdb
+
+Create directories that will contain runit configuration for CouchDB::
+
+    sudo mkdir /etc/sv/couchdb
+    sudo mkdir /etc/sv/couchdb/log
+
+Create /etc/sv/couchdb/log/run script::
+
+    #!/bin/sh
+    exec svlogd -tt /var/log/couchdb
+
+Basically it determines where and how exactly logs will be written.
+See ``man svlogd`` for more details.
+
+Create /etc/sv/couchdb/run::
+
+    #!/bin/sh
+    export HOME=/home/couchdb
+    exec 2>&1
+    exec chpst -u couchdb /home/couchdb/bin/couchdb
+
+This script determines how exactly CouchDB will be launched.
+Feel free to add any additional arguments and environment
+variables here if necessary.
+
+Make scripts executable::
+
+    sudo chmod u+x /etc/sv/couchdb/log/run
+    sudo chmod u+x /etc/sv/couchdb/run
+
+Then run::
+
+    sudo ln -s /etc/sv/couchdb/ /etc/service/couchdb
+
+In a few seconds runit will discover a new symlink and start CouchDB.
+You can control CouchDB service like this::
+
+    sudo sv status couchdb
+    sudo sv stop couchdb
+    sudo sv start couchdb
+
+Naturally now CouchDB will start automatically shortly after system starts.
+
+You can also configure systemd, launchd or SysV-init daemons to launch
+CouchDB and keep it running using standard configuration files. Consult
+your system documentation for more information.


Mime
View raw message