Update README to include Bionic steps
[opensrf-equinox.git] / README
diff --git a/README b/README
index 2925a94..a3091d4 100644 (file)
--- a/README
+++ b/README
@@ -64,10 +64,11 @@ make -f src/extras/Makefile.install <osname>
 
 Well-tested values for <osname> include:
 
-  * `debian-jessie` for Debian 8.0
-  * `debian-wheezy` for Debian 7.0
+  * `debian-stretch` for Debian 9
+  * `debian-jessie` for Debian 8
   * `ubuntu-trusty` for Ubuntu 14.04
   * `ubuntu-xenial` for Ubuntu 16.04
+  * `ubuntu-bionic` for Ubuntu 18.04
 
 Patches and suggestions for improvement from users of these distributions,
 or others, are welcome!
@@ -206,13 +207,13 @@ work for OpenSRF.
 1. Stop ejabberd before making any changes to its configuration by issuing the
    following command as the *root* Linux account:
 +
-.(Debian / Ubuntu Trusty) Stopping ejabberd
+.(Ubuntu Trusty) Stopping ejabberd
 [source, bash]
 ---------------------------------------------------------------------------
 /etc/init.d/ejabberd stop
 ---------------------------------------------------------------------------
 +
-.(Ubuntu Xenial) Stopping ejabberd
+.(Debian / Ubuntu Xenial / Ubuntu Bionic) Stopping ejabberd
 [source, bash]
 ---------------------------------------------------------------------------
 systemctl stop ejabberd.service
@@ -220,7 +221,7 @@ systemctl stop ejabberd.service
 +
 2. Edit the ejabberd config file.
 +
-(Debian Wheezy / Ubuntu Trusty) Ejabberd 2.x.x::
+(Ubuntu Trusty) Ejabberd 2.x.x::
 Open `/etc/ejabberd/ejabberd.cfg` and make the following
 changes:
   a. Define your public and private domains in the `hosts` directive. For
@@ -258,7 +259,7 @@ hosts:
     ##access_max_user_messages: max_user_offline_messages
 -----------------------
 +
-(Ubuntu Xenial) Ejabberd 16.x::
+(Debian Stretch / Ubuntu Xenial) Ejabberd 16.x::
 Open `/etc/ejabberd/ejabberd.yml` and make the following
 changes:
   a. Define your public and private domains in the `hosts` directive. For
@@ -282,15 +283,41 @@ hosts:
     ##access_max_user_messages: max_user_offline_messages
 -----------------------
 +
+(Ubuntu Bionic) Ejabberd 18.x::
+Open `/etc/ejabberd/ejabberd.yml` and make the following
+changes:
+  a. Define your public and private domains in the `hosts` directive. For
+   example:
++
+[source, bash]
+---------------------------------------------------------------------------
+hosts:
+  - "localhost"
+  - "private.localhost"
+  - "public.localhost"
+---------------------------------------------------------------------------
++
+  b. Change `auth_password_format` to plain
+  c. Change `shaper:` `normal` and `fast` values to 500000
+  d. Increase the `max_user_sessions:` `all:` value to 10000
+  e. Change `starttls_required` to false
+  f. Uncomment the `mod_legacy_auth` directive
+  g. Comment out the `mod_offline` directive
++
+-----------------------
+##mod_offline:
+    ##access_max_user_messages: max_user_offline_messages
+-----------------------
++
 3. Restart the ejabberd server to make the changes take effect:
 +
-.(Debian / Ubuntu Trusty) Starting ejabberd
+.(Ubuntu Trusty) Starting ejabberd
 [source, bash]
 ---------------------------------------------------------------------------
 /etc/init.d/ejabberd start
 ---------------------------------------------------------------------------
 +
-.(Ubuntu Xenial) Starting ejabberd
+.(Debian / Ubuntu Xenial / Ubuntu Bionic) Starting ejabberd
 [source, bash]
 ---------------------------------------------------------------------------
 systemctl start ejabberd.service
@@ -416,8 +443,8 @@ srfsh# request opensrf.math add 2,2
 +
 You should receive the value `4`.
 
-Optional: Websockets installation instructions
-----------------------------------------------
+Websockets installation instructions: Option #1 Apache
+-------------------------------------------------------
 Websockets are new to OpenSRF 2.4+ and are required for operating the new web-based
 staff client for Evergreen.  Complete the following steps as the *root* Linux 
 account:
@@ -443,13 +470,6 @@ apxs2 -i -a -c mod_websocket.c
 3. Create the websocket Apache instance (more information about this in 
    `/usr/share/doc/apache2/README.multiple-instances`)
 +
-.(Debian)
-[source, bash]
----------------------------------------------------------------------------
-sh /usr/share/doc/apache2.2-common/examples/setup-instance websockets
----------------------------------------------------------------------------
-+
-.(Ubuntu Trusty / Xenial)
 [source, bash]
 ---------------------------------------------------------------------------
 sh /usr/share/doc/apache2/examples/setup-instance websockets
@@ -465,14 +485,6 @@ a2dismod websocket
 5. Change to the directory into which you unpacked OpenSRF, then copy into
    place the config files
 +
-.(Debian)
-[source, bash]
----------------------------------------------------------------------------
-cd /path/to/opensrf-OSRFVERSION
-cp examples/apache2/websockets/apache2.conf /etc/apache2-websockets/
----------------------------------------------------------------------------
-+
-.(Ubuntu Trusty / Xenial)
 [source, bash]
 ---------------------------------------------------------------------------
 cd /path/to/opensrf-OSRFVERSION
@@ -519,6 +531,54 @@ export OSRF_WEBSOCKET_MAX_REQUEST_WAIT_TIME=600
 /etc/init.d/apache2-websockets start
 ---------------------------------------------------------------------------
 
+Websockets installation instructions: Option #2 Websocketd
+----------------------------------------------------------
+
+1. Install websocketd (latest stable release from http://websocketd.com/)
++
+.(Debian, Ubuntu)
+[source,bash]
+---------------------------------------------------------------------------
+cd /tmp
+wget 'https://github.com/joewalnes/websocketd/releases/download/v0.3.0/websocketd-0.3.0-linux_amd64.zip'
+unzip websocketd-0.3.0-linux_amd64.zip
+sudo cp websocketd /usr/local/bin/
+---------------------------------------------------------------------------
++
+2. Run websocketd
++
+Choose option a or b, below.
++
+a. Run websocketd as 'opensrf'
++
+[NOTE]
+===========================================================================
+This choice requires one of the proxy configurations mentioned below.
+===========================================================================
++
+.(Debian, Ubuntu)
+[source,bash]
+---------------------------------------------------------------------------
+/usr/local/bin/websocketd --port 7682 /openils/bin/osrf-websocket-stdio &
+
+# Other useful command line parameters include:
+# --loglevel debug|trace|access|info|error|fatal
+# --maxforks <n>
+# --sameorigin=true
+# --origin=host[:port][,host[:port]...]
+
+# See https://github.com/joewalnes/websocketd/blob/master/help.go
+---------------------------------------------------------------------------
++
+b. Run websocketd without a proxy
++
+.(Debian, Ubuntu)
+[source,bash]
+---------------------------------------------------------------------------
+sudo -b /usr/local/bin/websocketd --port 7682 --ssl --sslcert=/etc/apache2/ssl/server.crt \
+     --sslkey=/etc/apache2/ssl/server.key /openils/bin/osrf-websocket-stdio
+---------------------------------------------------------------------------
+
 Optional: Using NGINX as a proxy
 --------------------------------
 NGINX can be used to proxy HTTP, HTTPS, and WebSockets traffic. Among other
@@ -544,13 +604,14 @@ for installing WebSockets support.
 apt-get install nginx
 ---------------------------------------------------------------------------
 +
-3. Copy the example NGINX configuration file into place.
+3. Copy the example NGINX configuration file into place and remove default.
 +
 [source, bash]
 ---------------------------------------------------------------------------
 cd /path/to/opensrf-OSRFVERSION
 cp examples/nginx/osrf-ws-http-proxy /etc/nginx/sites-available/
 ln -s /etc/nginx/sites-available/osrf-ws-http-proxy /etc/nginx/sites-enabled/osrf-ws-http-proxy
+rm /etc/nginx/sites-enabled/default
 ---------------------------------------------------------------------------
 +
 4. Edit `/etc/nginx/sites-available/osrf-ws-http-proxy` to set the location
@@ -641,7 +702,7 @@ you need to install the `dnsmasq` package, configure it to serve up a DNS
 entry for localhost, and point your local DNS resolver to `dnsmasq`. For example,
 on Ubuntu you can issue the following commands as the *root* Linux account:
 
-.(Debian / Ubuntu) Installing and starting `dnsmasq`
+.Installing and starting `dnsmasq`
 [source, bash]
 ---------------------------------------------------------------------------
 aptitude install dnsmasq