From eb169b83946101b1b37437e7be9146ed5b34288b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 22 Nov 2022 15:25:44 -0500 Subject: [PATCH] Redis INSTALL docs Signed-off-by: Bill Erickson --- README | 136 +++++++++++++---------------------------------------------------- 1 file changed, 27 insertions(+), 109 deletions(-) diff --git a/README b/README index 512dee0..f3e7d9e 100644 --- a/README +++ b/README @@ -193,137 +193,43 @@ On most other systems, you can add these entries to `/etc/ld.so.conf`, or create a file within the `/etc/ld.so.conf.d/` directory, and then run `ldconfig` as the *root* Linux account. -Configure the ejabberd server +Configure the Redis server ----------------------------- -[TIP] -===== -It is recommended to disable the apparmor profile for ejabberd on *Ubuntu* before -continuing. If you are installing on any version of *Ubuntu*, run the following -commands as the *root* Linux account: +==== -[source,bash] ---------------------------------------------------------------------------- -ln -s /etc/apparmor.d/usr.sbin.ejabberdctl /etc/apparmor.d/disable/ -apparmor_parser -R /etc/apparmor.d/usr.sbin.ejabberdctl ---------------------------------------------------------------------------- -===== +OpenSRF requires a Redis server. -OpenSRF requires an XMPP (Jabber) server. For performance reasons, ejabberd is -the Jabber server of choice for the OpenSRF project. In most cases, you only -have to make a few changes to the default configuration file to make ejabberd -work for OpenSRF. - -1. Stop ejabberd before making any changes to its configuration by issuing the +1. Stop Redis before making any changes to its configuration by issuing the following command as the *root* Linux account: + -.Stopping ejabberd -[source, bash] ---------------------------------------------------------------------------- -systemctl stop ejabberd.service ---------------------------------------------------------------------------- -+ -2. Edit the ejabberd config file. -+ -(Debian Buster / Ubuntu Focal) 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: -+ +.Stopping Redis [source, bash] --------------------------------------------------------------------------- -hosts: - - "localhost" - - "private.localhost" - - "public.localhost" +systemctl stop redis-server --------------------------------------------------------------------------- + - b. Change `starttls_required` to false - c. Change `auth_password_format` to plain - d. Change `shaper:` `normal` and `fast` values to 500000 - e. Increase the `max_user_sessions:` `all:` value to 10000 - f. Comment out the `mod_offline` directive -+ ------------------------ -##mod_offline: - ##access_max_user_messages: max_user_offline_messages ------------------------ -+ - g. Uncomment or add the `mod_legacy_auth` directive under the `modules:` section +2. Edit the Redis config file. + ------------------------ -mod_legacy_auth: {} ------------------------ -+ -(Debian Bullseye / Ubuntu Jammy) Ejabberd 21.x:: -Open `/etc/ejabberd/ejabberd.yml` and make the following +Open `/etc/redis/redis.conf` and make the following changes: - a. Define your public and private domains in the `hosts` directive. For + a. Disable persistence by modifying the 'save' variable. example: + [source, bash] --------------------------------------------------------------------------- -hosts: - - localhost - - private.localhost - - public.localhost +# Snapshotting can be completely disabled with a single empty string argument +# as in following example: +# +save "" --------------------------------------------------------------------------- + - b. Change `starttls_required` to false - c. Change `auth_password_format` to plain - d. Change all `shaper:` `normal` and `fast` values to 500000 - e. Increase the `shaper_rules:` `max_user_sessions:` value to 10000 - f. Comment out the `shaper_rules:` `max_user_offline_messages:` values -+ ------------------------ -##max_user_offline_messages: - ##5000: admin - ##100: all ------------------------ -+ - g. Comment out the `mod_offline` directive -+ ------------------------ -##mod_offline: - ##access_max_user_messages: max_user_offline_messages ------------------------ -+ - h. Add the `mod_legacy_auth` directive under the `modules:` section -+ ------------------------ -mod_legacy_auth: {} ------------------------ -+ -3. Restart the ejabberd server to make the changes take effect: +3. Restart the Redis server to make the changes take effect: + .Starting ejabberd [source, bash] --------------------------------------------------------------------------- -systemctl start ejabberd.service ---------------------------------------------------------------------------- - -Create the OpenSRF Jabber users -------------------------------- - -On each domain, you need two Jabber users to manage the OpenSRF communications: - - * a `router` user, to whom all requests to connect to an OpenSRF service - will be routed; this Jabber user must be named `router` - * an `opensrf` user, which clients use to connect to OpenSRF services; this - user can be named anything you like - -Create the Jabber users by issuing the following commands as the *root* Linux -account. Substitute `` for your chosen passwords for each user -respectively: - -.Creating the OpenSRF Jabber users -[source, bash] ---------------------------------------------------------------------------- -ejabberdctl register router private.localhost -ejabberdctl register opensrf private.localhost -ejabberdctl register router public.localhost -ejabberdctl register opensrf public.localhost +systemctl start redis-server --------------------------------------------------------------------------- Update the OpenSRF configuration files @@ -362,6 +268,7 @@ Updating the OpenSRF configuration files cd SYSCONFDIR cp opensrf_core.xml.example opensrf_core.xml cp opensrf.xml.example opensrf.xml +cp redis-accounts.example.txt redis-accounts.txt --------------------------------------------------------------------------- + 2. Edit the `SYSCONFDIR/opensrf_core.xml` file to update the four username @@ -379,6 +286,17 @@ cp opensrf.xml.example opensrf.xml password to match the password you set for the Jabber `opensrf` user at the `private.localhost` domain. +Creating Redis Accounts +-------------------------------------- + +Before starting services, it's necessary to create Redis accounts. +Issue the following command as the *opensrf* Linux account: + +[source, bash] +--------------------------------------------------------------------------- +osrf_control --reset-message-bus +--------------------------------------------------------------------------- + Starting and stopping OpenSRF services -------------------------------------- -- 2.11.0