Skip to content

EGroupware Community Edition Installation

Hadi Nategh edited this page May 22, 2018 · 10 revisions

WikiInstallation instructionsEGroupware Community Edition Installation

Content


Short Overview

The application EGroupware is external represented by a central webserver. A standard webbrowser is used as client. Therefore the application EGroupware is universal available.

As data storage a SQL database and the web-server filesystem is used.

The EGroupware itself consist of php-, javascript-, html- and css-programs, that will be installed in a directory on the server filesystem. The default installation directory is /usr/share/egroupware/.

The EGroupware installation workflow:

  • provision a server with an operating system - preferable Linux
  • installation of a web server software like apache (httpd)
  • installation of the programming language “php” with the extensions “pear” and “pecl”
  • installation of a sql database software
  • installation of the EGroupware software itself
  • configuration of the web server, “php” and the database server
  • creation of the EGroupware database with tables and to execute the EGroupware setup steps

With the provision of the Community Edition repositories for various Linux distributions the installation process is simplyfied and reduced to following steps:

  • providing a Linux Server - now a minimal installation is sufficient, which most distributions provide with a so called minimal installation media
  • configuring the EGroupware Community Edition repository and adding additional repositories to the Linux system of your choice
  • an update / install with the shell command installer of your distribution
  • if possible and wanted a differing configuration from the standard installation defaults

What do I need to backup, if I have a already running EGroupware Installation

Before you begin to update an already in use EGroupware installation, you should do a backup of the following:

  • the EGroupware database content
  • the content of the directories “files” and “backup” located on the server filesystem

The easiest way to do a database backup is with an administrator privileged account in EGroupware in the modul “Admin” - “DB backup and restore”. The same function you will find in the EGroupware setup panel. The database export will be stored on your server filesystem in the directory you have defined in the setup under the panel “edit current configuration” (//backup/). You will find there also the path of the file directory you should backup. They are called:

  • “full path for users and group files”
  • “full path to the backup directory”

The default directory of the above files and backup directories is: /var/lib/egroupware/

After the installation you will need to restore and migrate the saved database backup using EGroupware setup. You may need to add/change your egroupware database password in /var/lib/egroupware/header.inc.php. The variables you need to change are: db_user and db_pass.

Installation

For any Linux distribution the installation steps has to be done as user root and with root rights in a terminal session.

Please consider that your network and firewall on your server is configured to allow ports http/80, https/443 traffic.

Help on commands used through the installation process is always available on your system in kind of the manual pages - man commandname -, by entering the command with option -h or --help or entering the command without any options, which show usually a brief usage info of the command.

back to Content

RedHat and CentOS

Installer command: yum (rpm)

Attention should be paid to SE-Linux on RedHat and CentOS:

SE-Linux enforced may lead to problems accessing file paths for the webserver and the database server that needs to be accessable by EGroupware. The EGroupware install process tries to enable the used default file paths for SE-Linux but it does no harm to disable SE-Linux during the installation process. To disable SE-Linux set in file /etc/selinux/config the variable from SELINUX=enforcing to SELINUX=disabled. To activate that change a reboot of your Linux system is necessary.

Information how SE-Linux works and how to configure it after installation of EGroupware can be found at: http://wiki.centos.org/HowTos/SELinux

Step 1:

Setup the needed PHP IUS repositories for a PHP 5.4 installation.

For CentOS 7 and RedHat 7:

NOTE: CentOS7 and RedHat 7 contain already a PHP 5.4 Version; only for the PHP mcrypt extension it is necessary to add and install the epel-release repository.

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
rpm -ivh epel-release-7-9.noarch.rpm

if the php is not installed or would like to install new php 7, you need to do the following:

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install https://centos7.iuscommunity.org/ius-release.rpm
sudo yum install -y php71u php71u-cli php71u-common php71u-fpm php71u-gd php71u-mbstring php71u-mysqlnd php71u-opcache php71u-pdo php71u-pear php71u-pecl-igbinary php71u-pecl-memcache php71u-pecl-memcached php71u-process php71u-xml php71u-json php71u-tidy php71u-bcmath
sudo systemctl restart httpd

Switch to the root home directory:

cd /root

Download with wget the installation rpm files: (Consider: if CentOS was installed from minimal install media you must install wget)

yum install wget

For 32 Bit systems and RHEL5 / CentOS5 version:

wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-11.ius.el5.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/epel-release-5-4.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/yum-plugin-replace-0.2.6-1.ius.el5.noarch.rpm

For 32 Bit systems and RHEL6 / CentOS6 version:

wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/i386/ius-release-1.0-11.ius.el6.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/i386/epel-release-6-5.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/i386/yum-plugin-replace-0.2.6-1.ius.el6.noarch.rpm

For 64 Bit systems and RHEL5 / CentOS5 version:

wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-11.ius.el5.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-5-4.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/yum-plugin-replace-0.2.6-1.ius.el5.noarch.rpm

For 64 Bit systems and RHEL6 / CentOS6 version:

wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-11.ius.el6.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/epel-release-6-5.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/yum-plugin-replace-0.2.6-1.ius.el6.noarch.rpm

If your download fails, please check on the web page whether a newer version is supplied.

http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/
http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/i386/
http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/
http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/

After the successful download of the rpm files in the /root/ directory, install the repositories as follows:

rpm -i epel-release*.rpm
rpm -i ius-release*.rpm
rpm -i yum-plugin*

Check whether a php version is already installed on your server with:

php -v

As a result the php version is returned or the message: not found

Is a php-version installed, replace it with the php54 IUS version:

yum replace php --replace-with php54

If php isn't installed install it with:

yum install php54

After the successful installation of php, set for php the timezone of your region. Find file php.ini in directory /etc:

find /etc -name php.ini

Edit file php.ini and add variable date.timezone for your region like:

date.timezone = Europe/London

Further timezone defnitions are listed on the web pages: http://php.net/date.timezone and http://de2.php.net/manual/de/timezones.php

Step 2:

Now install EGroupware:

In your Webbrowser go to following Website: RPM packages from openSUSE buildservice

Choose the Icon of your Linux Distribution and execute the described installation instructions. Please note: import the release.key before you install egroupware.

Note: Due to the defined package dependencies also database, webserver and php software will be installed with egroupware unless they are not already installed on the system. After the softwarepackages are installed as far as possible an automated egroupware setup takes place.

After successful installation the EGroupware login credentials are written at the end of the file /root/egroupware-epl-install.log.

If errors occur during the installation you will find hints and error descriptions in /root/egroupware-epl-install.log and in logfiles located in directory /var/log/.

According to your requirements and the amount of users using your installation the mysql database system and php may need adjustments. Details are specified in chapter MySQL and PHP adjustments.

back to Content

SuSE (SLES and OpenSuSE)

Installer command: zypper

Installation on OpenSUSE

EGroupware installation:

In your Webbrowser go to following Website: RPM packages from openSUSE buildservice

Choose the Icon of your Linux Distribution and execute the described installation instructions. Please note: import the release.key before you install egroupware.

Note: Due to the defined package dependencies also database, webserver and php software will be installed with egroupware unless they are not already installed on the system. After the softwarepackages are installed as far as possible an automated egroupware setup takes place.

Set for php the timezone of your region. Find file php.ini in directory /etc

find /etc -name php.ini

Edit file php.ini and add the variable date.timezone for your region like:

date.timezone = Europe/London

Further timezone defnitions are listed on the web pages: http://php.net/date.timezone and http://de2.php.net/manual/de/timezones.php

After successful installation the EGroupware login credentials are written at the end of the file /root/egroupware-epl-install.log.

If errors occur during the installation you will find hints and error descriptions in /root/egroupware-epl-install.log and in logfiles located in directory /var/log/.

According to your requirements and the amount of users using your installation the mysql database system and php may need adjustments. Details are specified in chapter MySQL and PHP adjustments.

Installation on SLES

EGroupware installation:

In your Webbrowser go to following Website: RPM packages from openSUSE buildservice

Choose the Icon of your Linux Distribution and execute the described installation instructions. Please note: import the release.key before you install egroupware.

Note: Due to the defined package dependencies also database, webserver and php software will be installed with egroupware unless they are not already installed on the system. After the softwarepackages are installed as far as possible an automated egroupware setup takes place.

If problems occur with the SLES 11 SP2 or SLES 11 SP3 php 5.3 version add with yast following repository:

http://download.opensuse.org/repositories/server:/php/SLE_11_SP2/
or:
http://download.opensuse.org/repositories/server:/php/SLE_11_SP3/

Now a php 5.4 version can be installed that works with EGroupware.

Should after installing php from the openSuSE repository apache2 not start or if you do a php -v version check the message:
libc-client.so.2006c1_suse not found
appear, a newer libc-client library was installed as expected by php-imap. Please correct as follows:

a2enmod php5
cd /usr/lib64
ls -l libc-client.so*

set a softlink pointing from new to the old version:

ln -s libc-client.so.2007e_suse libc-client.so.2006c1_suse

Set for php the timezone for your region. Find file php.ini in directory /etc

find /etc -name php.ini

Edit file php.ini and add the variable date.timezone for your region like:

date.timezone = Europe/London

Further timezone defnitions are listed on the web pages: http://php.net/date.timezone and http://de2.php.net/manual/de/timezones.php

After successful installation the EGroupware login credentials are written at the end of the file /root/egroupware-epl-install.log.

If errors occur during the installation you will find hints and error descriptions in /root/egroupware-epl-install.log and in logfiles located in directory /var/log/.

According to your requirements and the amount of users using your installation the mysql database system and php may need adjustments. Details are specified in chapter MySQL and PHP adjustments.

back to Content

Debian

Installer command: apt-get and aptitude

EGroupware installation:

In your Webbrowser go to following Website: RPM packages from openSUSE buildservice

Choose the Icon of your Linux Distribution and execute the described installation instructions. Please note: import the release.key before you install egroupware.

During the installation you will be prompted to enter user and passwords for the mysql server etc.; If you have already installed mysql-server with a given mysql root password, you need to enter the given password if you are prompted to enter the mysql root password.

Set for php the timezone for your region. Find file php.ini in directory /etc

find /etc -name php.ini

Edit file php.ini and add the variable date.timezone for your region like:

date.timezone = Europe/London

Further timezone defnitions are listed on the web pages: http://php.net/date.timezone and http://de2.php.net/manual/de/timezones.php

After successful installation the EGroupware login credentials are written at the end of the file /root/egroupware-epl-install.log.

If errors occur during the installation you will find hints and error descriptions in /root/egroupware-epl-install.log and in logfiles located in directory /var/log/.

According to your requirements and the amount of users using your installation the mysql database system and php may need adjustments. Details are specified in chapter MySQL and PHP adjustments.

back to Content

Ubuntu

Installer command: apt-get und aptitude

EGroupware installation:

In your Webbrowser go to following Website: RPM packages from openSUSE buildservice

Choose the Icon of your Linux Distribution and execute the described installation instructions. Please note: import the release.key before you install egroupware.

During the installation you will be prompted to enter user and passwords for the mysql server etc.; If you have already installed mysql-server with a given mysql root password, you need to enter the given password if you are prompted to enter the mysql root password.

Set for php the timezone for your region. Find file php.ini in directory /etc

find /etc -name php.ini

Edit file php.ini and add the variable date.timezone for your region like:

date.timezone = Europe/London

Further timezone defnitions are listed on the web pages: http://php.net/date.timezone and http://de2.php.net/manual/de/timezones.php

After successful installation the EGroupware login credentials are written at the end of the file /root/egroupware-epl-install.log.

If errors occur during the installation you will find hints and error descriptions in /root/egroupware-epl-install.log and in logfiles located in directory /var/log/.

According to your requirements and the amount of users using your installation the mysql database system and php may need adjustments. Details are specified in chapter MySQL and PHP adjustments.

back to Content

MySQL and PHP adjustments

Example Configurations for MySQL respectively Maria DB can be found under the directory /usr/share of your server. Those can be copied as my.cnf for MySQL or server.cnf for Maria DB to directory /etc. To find them enter:

find /usr/share -name my\*.cnf

We recommend the my-huge.cnf which should fit for most customers. Replace the my.cnf / server.cnf you find in /etc with the my-huge.cnf file:

e.g.
find /etc -name \*.cnf

cp /usr/share/doc/MariaDB-server-5.5.23/my-huge.cnf /etc/mariadb/server.cnf

or

cp /usr/share/mysql/my-huge.cnf /etc/my.cnf

If you don't connect from other servers or systems to the MySQL database over the network, you should uncomment the variable #skip-networking for security reasons. If you don't use a mysql cluster environment, comment log_bin or set al least expire_logs_days = 5, to avoid a large amount of mysql binary logs in /var/lib/mysql directory. After making adjustment in my.cnf a mysql server restart is required (e.g. /etc/init.d/mysqld restart).

For php some more adjustments may be done in the /etc directory tree in php.ini and the egroupware.conf like already discussed in the section time zone settings during the install. Following values listed below maybe changed mostly increased. If in doubt, try some values until you are satisfied with the result. After changes in those files, the apache webserver must be restartet or reloaded to take effect.

php_value max_execution_time 90
php_value memory_limit 128M
php_value session.gc_maxlifetime 14400
php_value upload_max_filesize 64M
php_value post_max_size 65M

The two values you mostly adjust are:

php_value upload_max_filesize will determine the size of files users will be able to upload in filemanager or links.

php_value session.gc_maxlifetime determine the time in seconds of inactivity before a user session will be terminated.

back to Content

Setup SSL (https) access to your EGroupware

If you are accessing your EGroupware from the internet, it should be only done encrypted via ssl - https. Port 80 should be disabled and port 443 as default enabled in the web server and as well in your firewall.

Is the apache module mod_ssl installed a basic so called root server certificate is put in /etc/pki. Most or all of the browsers don't accept this by default. You can manually accept it after entering the URL and a secure https session will be established. If your staff accept this behaviour you might be done, but most of them will be annoyed. In this case you need to buy a SSL or SSL wildcard certificate for your domain and install it.

For the purchase of such a certificate, you need a so called certificate request created on your web server.

Assumed your company is called IT-perfect Ltd. and is located in Cardiff, Wales and the domain is it-perfect.co.uk. The request is generated on your EGroupware server as follows:

Single domain SSL (your EGroupware URL is: https://egroupware.it-perfect.co.uk/egroupware):

openssl req -new -newkey rsa:2048 -nodes -sha256 -out egroupware_it-perfect_co_uk.csr \
-keyout egroupware_it-perfect_co_uk.key \
-subj "/C=UK/ST=Wales/L=Cardiff/O=IT-perfect Ltd./CN=egroupware.it-perfect.co.uk"

Wildcard SSL:

openssl req -new -newkey rsa:2048 -nodes -sha256 -out star_it-perfect_co_uk.csr \
-keyout star_it-perfect_co_uk.key \
-subj "/C=UK/ST=Wales/L=Cardiff/O=IT-perfect Ltd./CN=*.it-perfect.co.uk"

The content of file egroupware_it-perfect_co_uk.csr or star_it-perfect_co_uk.csr needs to be copied during your purchase in the field where to paste the certficate request.

After your identity and/or domain was validated and the purchase is made you will get your certificate file and a so called intermediate or root certificate (CA). Those files with the ending of .crt or .pem needs to be copied where you have the .csr and .key file generated in the previous steps. Then you need to create the .pem file for your web server apache from the .key and .crt file as follows:

cat star_it-perfect_co_uk.key star_it-perfect_co_uk.crt >> star_it-perfect_de.pem
or
cat egroupware_it-perfect_co_uk.key egroupware_it-perfect_co_uk.crt >> egroupware_it-perfect_de.pem

Now only your web server apache needs to know where to find your certificate files. Edit /etc/httpd/conf.d/ssl_conf and add the full path to your certificate files e.g:

SSLCertificateFile //egroupware_it-perfect_de.pem
# here the place for the intermediate / root certificate of your certificate provider 
SSLCertificateChainFile //CA.crt

After a restart/reload of your webserver the browser should now show a valid certificate of your certificate provider while accessing your EGroupware URL.

back to Content

Keeping your Installation up to date

It is good practice to update your system regularly with patches and security fixes. We recommend to do it once per week.

RedHat and CentOS:

Manual update:

yum update

Automatic update:

The software packet yum-updatesd or yum-cron needs to be installed.

In file /etc/yum/yum-updatesd.conf change do_update=no to do_update=yes. Then restart yum-updatesd: service yum-updatesd restart or /etc/init.d/yum-updatesd restart.

You'll find a description of yum-cron on: http://man7.org/linux/man-pages/man8/yum-cron.8.html

SuSE:

Manual update:

zypper update

Automatic update: Enter Yast; there is a menu item called online update configuration where you can configure your system update behaviour.

Debian and Ubuntu:

Manual update:

aptitude update; aptitude safe-upgrade;

Automatic update: Using a cron script or cron-apt; have a look at: https://help.ubuntu.com/community/AutomaticSecurityUpdates or https://help.ubuntu.com/community/AutoWeeklyUpdateHowTo


back to Content

Clone this wiki locally