How to install Roundcube on your ISPConfig3 server on CentOS 6

 
This tutorial has been created for those who have installed The Perfect Server - CentOS 6.4 x86_64 [ISPConfig 3] and wish to have alternative webmail application - Roundcube. You may still able access to Squiremail as this Roundcube installation will not overwrite the Squirremail.

I noticed there are lack of tutorials for installing the Roundcube on CentOS and the Roundcube plugin for ISPConfig is not working for me somehow. Okay, let's start.

Step 1

You need to get the database and database user details ready. You may create them with ISPConfig or using tools like phpmyadmin or sqlyog. For example:

Database name: dbroundcube
Database user: roundcubeuser
Database user password: xxxxxx

Then, initialize the database by importing the SQL file from /usr/share/roundcube/SQL/mysql.initial.sql.

Step 2

We need to create the folder where our roundcube code will be stored.

mkdir /usr/share/roundcube
cd /usr/share/roundcube

Step 3

Download the latest version from the web of roundcube and uncompress in the current directory.

wget http://jaist.dl.sourceforge.net/project/roundcubemail/roundcubemail/1.0.0/roundcubemail-1.0.0.tar.gz
tar -zxvf roundcubemail-1.0.0.tar.gz
mv roundcubemail-1.0.0 roundcube

wget http://jaist.dl.sourceforge.net/project/roundcubemail/roundcubemail/1.0.0/roundcube-framework-1.0.0.tar.gz
tar -zxvf roundcube-framework-1.0.0.tar.gz

mkdir /usr/share/roundcube/installer/Roundcube
cp /usr/share/roundcube-framework-1.0.0/bootstrap.php /usr/share/roundcube/installer/Roundcube

Step 4

Give access to this folder.

chown root:root -R /usr/share/roundcube
chmod 777 -R /usr/share/roundcube/temp/
chmod 777 -R /usr/share/roundcube/logs/

Step 5

To configure the apache to point over Roundcube folder. Open the file /etc/httpd/conf/sites-enabled/000-ispconfig.conf and add these few lines:

[...]
<Directory /usr/share/roundcube>
  Order allow,deny
  Allow from all
</Directory>
[...]

Step 6

Create a file /etc/httpd/conf.d/roundcube.conf with the following content:

#
# Roundcube is a webmail package written in PHP.
#
Alias /roundcube /usr/share/roundcube
<Directory /usr/share/roundcube/config> Order Deny,Allow Deny from All </Directory>
<Directory /usr/share/roundcube/temp> Order Deny,Allow Deny from All </Directory>
<Directory /usr/share/roundcube/logs> Order Deny,Allow Deny from All </Directory>
# this section makes Roundcube use https connections only, for this you # need to have mod_ssl installed. If you want to use unsecure http # connections, just remove this section: <Directory /usr/share/roundcube> RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} </Directory>

Step 7

Edit the file /usr/share/roundcube/installer/index.php, change this line

require_once 'bc.php';

to

require_once '/usr/share/roundcube/program/include/bc.php';

then restart the web server.

service httpd restart

Step 8

Open up the URL https://{your_ip}/roundcube/installer Check the environment if everything tested OK. For database section, just make sure the database you want to install is OK.
Do the following if you see them in "Not available".

Intl: Not available

yum -y install libicu-devel
yum -y install php-intl

date.timezone: Not available
Edit your php.ini and set the value for it. E.g. Asia/Kuala_Lumpur

Restart the web server again.

Step 9

Fill up the database details and press CREATE CONFIG button. Copy the coding that system generated and paste it at /usr/share/roundcube/config/config.inc.php.

Step 10

CONTINUE onto next page. If you having the Not OK on mime.types, please do these steps at below:
Open /etc/httpd/conf/httpd.conf, make sure you have the following uncomment.

TypesConfig /etc/mime.types

Then,

cd /etc
mv /etc/mime.types /etc/mime.types.bak
wget http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
service httpd restart

Step 11

Remove the installer folder on roundcube.

rm -rf /usr/share/roundcube/installer

You may now try to login onto your mailbox at https://{your_ip}/roundcube.

Please correct me if I have mentioned anything wrong regarding on this tutorial. You may also correct my grammar mistake (I know there are a lots hehe). Thanks.

Share this page:

6 Comment(s)