Template:OXLoadBalancingClustering OXConfiguration: Difference between revisions

From Open-Xchange
 
(3 intermediate revisions by 3 users not shown)
Line 2: Line 2:
Install all relevant Open-Xchange Server packages to both groupware nodes after adding the Open-Xchange software repository to your package manages configuration. Corresponding installation instructions for your distribution can be found here:
Install all relevant Open-Xchange Server packages to both groupware nodes after adding the Open-Xchange software repository to your package manages configuration. Corresponding installation instructions for your distribution can be found here:


{{#if:{{{release|}}}|
* [[AppSuite:Open-Xchange_Installation_Guide_for_Debian_10.0|Download and Installation Guide for Debian GNU/Linux 10.0 (Buster)]]
{{#ifeq:{{{release|}}}|6.22|
* [[AppSuite:Open-Xchange_Installation_Guide_for_Debian_11.0|Download and Installation Guide for Debian GNU/Linux 11.0 (Bullseye)]]
 
* [[AppSuite:Open-Xchange_Installation_Guide_for_RHEL7|Download and Installation Guide for RedHat Enterprise Linux 7]]
* [[Open-Xchange_Installation_Guide_for_Debian_6.0_622|Download and Installation Guide for Debian GNU/Linux 6.0 (Squeeze)]]
* [[AppSuite:Open-Xchange_Installation_Guide_for_CentOS_7|Download and Installation Guide for CentOS 7]]
* [[Open-Xchange_Installation_Guide_for_SLES11_622|Download and Installation Guide for SUSE Linux Enterprise Server 11]]
* [[Open-Xchange_Installation_Guide_for_RHEL6_622|Download and Installation Guide for RedHat Enterprise Linux 6]]
* [[Open-Xchange Installation Guide for CentOS 6‎‎_622|Download and Installation Guide for CentOS 6]]
 
|{{#ifeq:{{{release|}}}|appsuite|
 
* [[AppSuite:Open-Xchange_Installation_Guide_for_Debian_6.0|Download and Installation Guide for Debian GNU/Linux 6.0 (Squeeze)]]
* [[AppSuite:Open-Xchange_Installation_Guide_for_Debian_7.0|Download and Installation Guide for Debian GNU/Linux 7.0 (Wheezy)]]
* [[AppSuite:Open-Xchange_Installation_Guide_for_SLES11|Download and Installation Guide for SUSE Linux Enterprise Server 11]]
* [[AppSuite:Open-Xchange_Installation_Guide_for_RHEL6|Download and Installation Guide for RedHat Enterprise Linux 6]]
* [[AppSuite:Open-Xchange_Installation_Guide_for_CentOS_6|Download and Installation Guide for CentOS 6]]
 
}}|}}| {{#!:
 
* [[Open-Xchange_Installation_Guide_for_Debian_6.0_622|Download and Installation Guide for Debian GNU/Linux 6.0 (Squeeze)]]
* [[Open-Xchange_Installation_Guide_for_SLES11_622|Download and Installation Guide for SUSE Linux Enterprise Server 11]]
* [[Open-Xchange_Installation_Guide_for_RHEL6_622|Download and Installation Guide for RedHat Enterprise Linux 6]]
* [[Open-Xchange Installation Guide for CentOS 6‎‎_622|Download and Installation Guide for CentOS 6]]
 
}}}}


It's also possible to install backend and frontend components on each node. The difference is that a backend only on each node demands separate machines which the fronend in front of the backend nodes, while you only need a load balancer in front of the nodes if you install the backend and the frontend on each node.
It's also possible to install backend and frontend components on each node. The difference is that a backend only on each node demands separate machines which the fronend in front of the backend nodes, while you only need a load balancer in front of the nodes if you install the backend and the frontend on each node.
Line 38: Line 18:
  $ /opt/open-xchange/sbin/oxinstaller --servername=oxserver --configdb-readhost=10.20.30.219 --configdb-writehost=10.20.30.217 --configdb-user=openexchange --master-pass=secret --configdb-pass=secret --jkroute=OX2 --ajp-bind-port=*
  $ /opt/open-xchange/sbin/oxinstaller --servername=oxserver --configdb-readhost=10.20.30.219 --configdb-writehost=10.20.30.217 --configdb-user=openexchange --master-pass=secret --configdb-pass=secret --jkroute=OX2 --ajp-bind-port=*


Startup the Administration Daemon on one of the nodes. Wait some seconds until the Open-Xchange Administration Daemon is started completely.
Startup the Open-Xchange Daemon on one of the nodes. Wait some seconds until it is started completely.
  $ /etc/init.d/open-xchange-admin start
  $ systemctl start open-xchange
   
   
Now register the Open-Xchange Server at the database. Note that a ''server'' is a whole cluster in this case. This step does only need to be performed on one of the Open-Xchange Server nodes.
Now register the Open-Xchange Server at the database. Note that a ''server'' is a whole cluster in this case. This step does only need to be performed on one of the Open-Xchange Server nodes.
Line 55: Line 35:


Now start Open-Xchange Server on both groupware nodes.
Now start Open-Xchange Server on both groupware nodes.
  $ /etc/init.d/open-xchange-groupware start
  $ systemctl stop open-xchange
$ systemctl start open-xchange
 
   
   
Create a new context and a testuser
Create a new context and a testuser

Latest revision as of 06:58, 1 August 2022

Configuring Open-Xchange Server

Install all relevant Open-Xchange Server packages to both groupware nodes after adding the Open-Xchange software repository to your package manages configuration. Corresponding installation instructions for your distribution can be found here:

It's also possible to install backend and frontend components on each node. The difference is that a backend only on each node demands separate machines which the fronend in front of the backend nodes, while you only need a load balancer in front of the nodes if you install the backend and the frontend on each node.

Create the configdb database at the MySQL Master. This step does only need to be performed on one of the Open-Xchange Server nodes.

$ /opt/open-xchange/sbin/initconfigdb --configdb-user=openexchange --configdb-pass=secret --configdb-host=10.20.30.217

Setup the Open-Xchange Server configuration. This step needs to be performed on 'both' groupware nodes. Note that the --jkroute parameter must equal the route parameter at the web servers proxy_ajp load balancing configuration of the specific server. Node 1:

$ /opt/open-xchange/sbin/oxinstaller --servername=oxserver --configdb-readhost=10.20.30.219 --configdb-writehost=10.20.30.217 --configdb-user=openexchange --master-pass=secret --configdb-pass=secret --jkroute=OX1 --ajp-bind-port=*

Node 2:

$ /opt/open-xchange/sbin/oxinstaller --servername=oxserver --configdb-readhost=10.20.30.219 --configdb-writehost=10.20.30.217 --configdb-user=openexchange --master-pass=secret --configdb-pass=secret --jkroute=OX2 --ajp-bind-port=*

Startup the Open-Xchange Daemon on one of the nodes. Wait some seconds until it is started completely.

$ systemctl start open-xchange

Now register the Open-Xchange Server at the database. Note that a server is a whole cluster in this case. This step does only need to be performed on one of the Open-Xchange Server nodes.

$ /opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P secret

Register the filestorage. This step does only need to be performed on one of the Open-Xchange Server nodes. Note that the NFS export must be mounted to the same path on both groupware nodes.

$ /opt/open-xchange/sbin/registerfilestore -A oxadminmaster -P secret -t file:///var/opt/filestore

Now register the MySQL Master database in configdb. This step does only need to be performed on one of the Open-Xchange Server nodes.

$ /opt/open-xchange/sbin/registerdatabase -A oxadminmaster -P secret --name oxdatabase --hostname 10.20.30.217 --dbuser openexchange --dbpasswd secret --master true
database 4 registered

Check the returned database ID which is 4 in this case. This value is required to register the MySQL Slave database in configdb. This step does only need to be performed on one of the Open-Xchange Server nodes.

$ /opt/open-xchange/sbin/registerdatabase -A oxadminmaster -P secret --name oxdatabase_slave --hostname 10.20.30.219 --dbuser openexchange --dbpasswd secret --master false --masterid=4

Now start Open-Xchange Server on both groupware nodes.

$ systemctl stop open-xchange
$ systemctl start open-xchange


Create a new context and a testuser

$ /opt/open-xchange/sbin/createcontext -A oxadminmaster -P secret -c 1 -u oxadmin -d "Context Admin" -g Admin -s User -p secret -L defaultcontext -e oxadmin@example.com -q 1024 --access-combination-name=all
$ /opt/open-xchange/sbin/createuser -c 1 -A oxadmin -P secret -u testuser -d "Test User" -g Test -s User -p secret -e testuser@example.com

Test Session load balancing

Apache is configured to use a 50:50 balancing between both Open-Xchange Servers. Now that they are up and running its time to check if this balancing works. This can be done by simply watching the Open-Xchange Server log files while a user logs in. Execute tail to the open-xchange.log.0 file on both servers. Then login with the testuser, one of the servers log file should show something like

$ tail -fn200 /var/log/open-xchange/open-xchange.log.0
[...]
INFO: Session created. ID: 31060fc80b9e44d38148ef4d5d19963d, Context: 1, User: 3

Then logout and login again. This time, the session should be created on the other server. On the client side, the JSESSIONID cookie at the browser shows evidence on which server the user has logged in by the trailing ".OX-" identifier. This identifier is set by Open-Xchange Server based on its AJP_JVM_ROUTE attribute.