eGroupware with Virtualmin and CentOS 6

Tags:

First, you will need the php-mcrypt module which is no longer provided in RHEL6 or Centos 6. For that, you must install the EPEL (Extra Packages for Enterprise Linux) library. As root, follow the instructions here as follows:

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm

(Do not use that command verbatim without double-checking the link above!). Then --

Following the instructions here

but changing the wget to:

wget http://download.opensuse.org/repositories/server:/eGroupWare/CentOS_6/server:eGroupWare.repo

then, noting capitazliation:

yum install eGroupware

which should say (amongst much other):

Installed: eGroupware.noarch 0:1.8.004.20120613-1.1

The software installs into /usr/share/groupware

I had to edit two parameters in my php.ini file.

Note that with Virtualmin, it is not /etc/php.ini to modify but rather the one for the domain in which you are running eGroupware. If your domain is a Virtualmin subdomain, the actual file might be:

/home/maindomain/domains/mydomain.com/etc/php5/php.ini

You can find the exact location by creating a file, let's say foo.php, within your public_html directory, and having the following contents:

<?php phpinfo(); ?>

Then look for the value of Loaded Configuration File... that is the php.ini file to edit.

Once you have located the right php.ini file, change:

upload_max_filesize = 16M

and un-commenting and modifying the line:

date.timezone = "America/Phoenix"

...and restart Apache:

sudo service httpd restart

Now, rather than write an Apache alias (which caused me problems with PHP files being returned as plaintext instead of executable code), I set a symlink:

ln -s /usr/share/egroupware public_html/egroupware

The RPM install of eGroupware sets a link from /usr/share/egroupware/header.inc.php to ../../../var/lib/egroupware/header.inc.php ... which should be actually in /var itself... thus, presumably, avoiding an RPM update from overwriting your config file. However this may cause problems with permissions. For me, I created the header.inc.php file but found that the directory /var/lib/egroupware was set to owner apache with no read or execute (i.e., list-directory) permissions for anyone else. This did the trick:

sudo chmod 755 /var/lib/egroupware sudo chmod 644 /var/lib/egroupware/header.inc.php

With that done, direct your web browser to http://www.yourdomain.com/egroupware and you should see the setup screen.

Note that you can have multiple domains with the single instance of egroupware. We could be fancy and call this a "multi-tenant" install. To do this, remove the "default" domain and add yourdomain.com, yourdomain2.com, and so on.

Copy the text of the created header.inc.php and paste it into /usr/share/egroupware/header.inc.php (which is actually /var/lib/egroupweare/header.inc.php).

In your domain's root directory (the one above public_html), create a directory egw that will contain the files and backup directories:

mkdir egw mkdir egw/files mkdir egw/backup chown youruser:apache -R egw/

and configure eGroupware to use, for example, /home/maindomain/domains/mydomain.com/files and /home/maindomain/domains/mydomain.com/backup as its directories.

At that point, you should be up and running!