How To Install Roundcube In Ispconfig 3
Installer RoundCube sur ISPConfig 3. How To Install RoundCube 0.7 For ISPConfig 3 On Debian Squeeze. Version 1.0 Author: Mattias Nurmi Last edited:. This will guide you thru the installation of the latest stable version of RoundCube (currently version 0.7) and get it to work together with ISPConfig 3. How To Install RoundCube 0.7 For ISPConfig 3 On Debian Squeeze Tweet Follow @kreationnext This will guide you thru the installation of the latest stable version of RoundCube (currently version 0.7) and get it to work together with ISPConfig 3.
On this page
- How To Install RoundCube 0.7 For ISPConfig 3 On Debian Squeeze
How To Install RoundCube 0.7 For ISPConfig 3 On Debian Squeeze
Version 1.0
Author: Mattias Nurmi
Last edited: 19/12/2011
This will guide you thru the installation of the latest stable version of RoundCube (currently version 0.7) and get it to work together with ISPConfig 3.
I made this guide with the help of several different guides on the internet, including some from the Howtoforge site, I hope this will make the installation easier and up to date.
This guide should work for most Linux distributions but may differ on some parts.
I do not issue any guarantee that this will work for you!
1 Remove Squirrelmail (optional)
If you have squirrelmail installed and want to remove it, use the following command to uninstall:
And also delete the configuration file in apache2 directory:
2 Download and extract RoundCube
First we make a folder for the webmail and change directory:
mkdir /var/www/webmail/
cd /var/www/
Then we download the latest stable version of RoundCube from http://www.roundcube.net/download and extract it:
wget http://sourceforge.net/projects/roundcubemail/files/roundcubemail/0.7/roundcubemail-0.7.tar.gz
tar xfz roundcubemail-0.7.tar.gz
mv roundcubemail-0.7/* webmail
rm roundcubemail-0.7.tar.gz
rm -rf roundcubemail-0.7
Then we change directory and give some permissions to the /logs and /temp directories:
cd webmail
chown -R www-data:www-data temp/ logs/
3 Prepare the database
Now we want to add a user and database for our RoundCube installation. With MySQL you can set up the database by issuing the following commands:
CREATE DATABASE roundcubemail;
GRANT ALL PRIVILEGES ON roundcubemail.* TO [email protected] IDENTIFIED BY 'password';
Ubuntu Roundcube
(Of course, you have to replace the database, username and password accordingly.)
Then we want to flush the users privileges or you will get a database connection error:
4 Configuring RoundCube
Now point your browser to http://url-to-roundcube/installer/ and follow theinstructions to start the installation of RoundCube. The first page shows therequirements, if everything is okay click 'START INSTALLATION'. The installerchecks if everything is there. In case you see some red NOT OK messages, you needto install or enable something. Follow the links to see what has to be done.
If everything checks out fine you are ready to create the configuration files,click 'NEXT' to get there. Get through the form and change the settings accordingto your needs. Do not forget to enter the database setting that we made earlierwithin the 'Database Setup' section.
When you are finished hit the 'CREATE CONFIG' button and you will get two textboxes with the information for main.inc.php and db.inc.php that you must create inyour /config directory.
Finally click 'CONTINUE' and get to the last step of the installation process.Your configuration will now be verified and tested against your webserver. Click'Initialize database' to create the necessary tables in your database.
If there are no red NOT OK messages, you can also try to send a mail in orderto test the SMTP settings.
Last but not least you have to remove the whole installer directory from thewebserver. If this remains active it can expose the configuration including passwords.We do this with the following command:
5 Adding aliases
For everyone to be able to access his webmail (under his domain name) you haveto create or edit the file /etc/apache2/conf.d/roundcube.conf and add the alias'/webmail' and some more information about the directories:
In my case, I haveonly made this with a redirect to the default domain of the ISPConfig 3 installationwith SSL for security and valid verifications
If you want to access the webmail with every domain without SSLyou can just remove/comment out the mod_rewrite section. This might give you someerrors, please look the following page (troubleshooting)for possible solutions http://trac.roundcube.net/wiki/Howto_Install
6 Final tweaks
We want to make some final tweeks in RoundCube by changing the followinglines in main.inc.php:
to:
Now go to http://www.yourdomain.com/webmail to access the newly created webmail interface.
Information
-More information about RoundCube: http://www.roundcube.net/
-Falko´s Howto The Perfect Server - Debian Squeeze (Debian 6.0) [ISPConfig 3]
Special Thanks to:
- Falko and Till. You make the world a better place!
- The HowtoForge team
- All people that contributed in some way in the making of this guide (external guides)
Introduction
So you've read up on what Roundcube is, and what it can do. But of course, you can't really know if you like it or not, unless you install it and use it for yourself for a week or two. This document will help guide you through a standard installation of Roundcube. We recommend you read this guide to familiarize yourself with how to install Roundcube, but for those who just want to get up and going, there is a shell script at the bottom to automate the installation and have you running almost instantly.
Other tutorials
Roundcube Setup
There's a nice how-to about the installation of Roundcube on a Windows box with IIS6 and hMailServer. NOTE: Make sure you set temp_dir in config.inc.php to an absolute path as otherwise users may run into issues with attaching files to emails.
Installation
Get Roundcube!
To get started, you need to download Roundcube. The easiest way to get it is to visit http://www.roundcube.net and click on 'Downloads'. Download the archive file containing Roundcube (name should end in .tar.gz
) and extract its contents (on Windows, with WinZip or 7-Zip, on Mac/Unix with tar xfz roundcubemail-xx.tar.gz
or gunzip -c roundcube-xx.tar.gz | tar xf -
) in the current directory.
Install dependencies
If you didn't download the 'complete' package, 3rd party libraries still need to be installed or updated for your Roundcube installation. This is done using Composer:
- Get composer from getcomposer.org
- Rename the
composer.json-dist
file intocomposer.json
- if you want to use LDAP address books, enable the LDAP libraries in your
composer.json
file by moving the items from 'suggest' to the 'require' section:
- run
php composer.phar install --no-dev
You also have to download JavaScript dependencies by running bin/install-jsdeps.sh
from Roundcube root directory.
Please note that this requires shell access to the webserver. If you don't have that,download the 'complete' package and copy the vendor
directory into the Roundcubeinstallation directory. That already contains all the dependencies you'd otherwiseinstall with Composer.
Get it ready
Now that we've got our files, we can upload the whole directory to the web server (using your favorite scp or FTP program) in case you're not already working there.
Roundcube needs to save some temp files and it also writes logs. Therefore make sure that the following directories (and the files within) are writable by the web server user:
temp
logs
Database Configuration
Next thing we need to do is decide what database backend we'll use. The most common is MySQL but others are PostgreSQL and SQLite.So once you decide, create a database with any name you want and grant privileges to a separate database user. It's recommended not to use an existing user or root.
With MySQL you can set up the database by issuing the following commands:
(of course you have to replace the database, username and password accordingly)
See the INSTALL
file for information about setting up PostgreSQL or SQLite
How To Install Roundcube Ispconfig 3 Ubuntu
If you are using MySQL, be sure to flush the users privileges when you add a new user or you will get a database connection error:
Note that preconfigured database tables are included in the SQL folder. Import or restore your version or you may get a 500 Error.
PHP Configuration
As any other PHP application some of its aspects depend on PHP settings. You should use php.ini or .htaccess (Apache module) or .user.ini (CGI/FastCGI SAPI) depending on your server setup. Roundcube when running will check most critical settings, try to set them and let you know if something's wrong. Here's a minimal list of settings that you might need to use (with suggested value):
- Memory limit:
memory_limit=64M
, - Options that control logging:
display_errors=Off
,log_errors=On
,error_log=logs/errors.log
, - Options that control file uploads (e.g. max attachment size):
upload_max_filesize=5M
,post_max_size=6M
, - Options that are not compatible with Roundcube:
zlib.output_compression=Off
,suhosin.session.encrypt=Off
,session.auto_start=Off
, - Options that control session behaviour:
session.gc_maxlifetime=21600
,session.gc_divisor=500
,session.gc_probability=1
.
Configuring Roundcube
After uploading the files point your browser to http://url-to-roundcube/installer/
to start the install wizard.The first page shows some requirements, and when you click 'START INSTALLATION', the installer checks if everything is there. In case you see some red NOT OK messages, you need to install or enable something. Follow the links or find out more by searching your web site for your server's operating system or http://www.php.net.
Once your web server is ready to run Roundcube you can start creating the config files on the next step. Click 'NEXT' to get there.Get through the form and change the settings according to your needs. Don't forget to enter the database credentials within the 'Database Setup' section.
All the config parameter are described with a few words. If you don't know that a setting means, find out more on the Configuration page or just trust the defaults.
When finished the configuration hit the 'CREATE CONFIG' button at the bottom of the page. You now get a text box on top of your browser window showing the configuration. Copy the content of that text box and save it into a file named config.inc.php
and copy/upload that into the config/
directory of your Roundcube installation. Warning: Pasting directly into an editor such as nano may not work due to word-wrapping. Please use vi or download the file directly instead.
Finally click 'CONTINUE' and get to the last step of the install process. Now your configuration is being verified tested against your webserver.
Click the 'Initialize database' button in you're requested to in order to create the necessary tables in your database.
If there are no red NOT OK messages, you can also try to send a mail in order to test the SMTP settings.
Last but not least you have to remove the whole installer directory from the webserver. If this remains active it can expose the configuration including passwords.
Protect your installation
Access through your webserver to at least the following directories should be denied:
/config
/temp
/logs
Roundcube use .htaccess files to protect this directories, be sure to allow override of the Limit
directives to get them taken into account or configure non-apache web servers accordingly to deny direct access to these private resources.
When running Roundcube at root of a virtual host, it's recommended to set the document root of that virtual host to the public_html
directory of your Roundcube installation.
Conclusion
This is a very basic setup to get you up and running with Roundcube in less than twenty minutes. There are plenty of other options, and a lot more options to investigate. See Configuration or browse the forums for other tricks and modifications, as well as support if you just can't get it working.
Have fun with your new Roundcube installation!!
Troubleshooting
500 Internal Server Error::This is a very common problem. The likely cause is AllowOverride Apache directive is in effect. Try to comment all the lines in .htaccess in the document root and then uncomment one line at a time to find which directives in .htaccess cause the error. If these directives protect some critical files from downloading, ask your hoster or administrator to give you more AllowOverride rights or include the problem directives from .htaccess file into administrator maintained configuration file.
How To Install Roundcube
Using MySQL - Database Error | Failed ConnectionMake sure your database connection string is correct. If you are using MySQL 4.1 or above, your client libraries may not support the new password encryption protocol:http://dev.mysql.com/doc/refman/5.0/en/old-client.html
Other IssuesIf you're still having trouble after following the steps above, check out the support page where you'll find information about our forum or the mailing list. We also answered some Frequently Asked Questions concerning Roundcube.
Shell Scripts
CentOS/RHEL
This shell script is written for CentOS/RHEL and assumes Apache is installed in a default way, with your MySQL, SMTP and IMAP servers running on the localhost. You will also need to install wget (yum install -y wget) if you haven't already. Once the script is finished, you can access roundcube by http://{your_web_server}/roundcube
or http://{your_web_server}/webmail
.
Debian
This shell script is written for Debian with MySQL, SMTP and IMAP servers running on the localhost (SSL/TLS enabled and unauthenticated SMTP allowed from localhost). It will set up roundcube-1.3.0 in a virtual host accessible by roundcube.yourdomain.tld
.
The script will:
- download and extract roundube-1.3.0
- make /temp and /logs writable by the webserver
- create an apache-site configuration (virtualhost)
- create a mysql user and database
- create a config.inc.php
- remove the installer directory
- create a cronjob to run /bin/cleandb.sh daily
- enable apache modules 'deflate', 'expires' and 'headers'
Install apache2:
Install php5:
Roundcube On Windows
Install mhp5-intl (as recommended in the installation instructions):
Set default time zone in php.ini (examples: UTC
, Europe/Zurich
, or see the PHP Manual for more):
Run the script debian_install_mysql.sh, also available for postgresql: debian_install_postgres.sh
Warning! These scripts may be out-of-date!