I tried to install and configure Roundcube from the Ubuntu repositories, but that failed. So I decided to install Roundcube from scratch. Here’s a small HowTo :
Step 1 : Creating A MySQL Database & User
Open the terminal and run this command to log in to MySQL server (use the MySQL password you have entered during the installation of the LAMP Server):
mysql -u root -p
Create a database for Roundcube Webmail Ex: roundcubedb
create database roundcubedb;
Create MySQL user for access Roundcube Webmail (example: usercube)
create user usercube;
Now Give user: usercube a password
set password for ‘usercube’ = password(‘usercube’);
set privileges usercube to access database roundcubedb using this command:
grant all privileges on roundcubedb.* to ‘usercube’ identified by ‘usercube’;
Now, Exit from MySQL server,by typing command:
exit
Step 2: Installing Roundcube Webmail
In this case Roundcube Webmail will be installed in the directory /var/www/webmail. Download and extract archieve Roundcube Webmail to directory /var/www/webmail
cd /tmp && wget -O roundcubemail-0.7.1.tar.gz http://goo.gl/zGnGZ
sudo tar -xzvf roundcubemail-0.7.1.tar.gz -C /var/www
sudo mv /var/www/roundcubemail-0.7.1/ /var/www/webmail
change ownership directory /var/www/webmail/temp and /var/www/webmail/logs to user and group www-data ( www-data is user and group web server)
sudo chown -R www-data.www-data /var/www/webmail/temp
sudo chown -R www-data.www-data /var/www/webmail/logs
Import database RoundCube to mysql server, login to mysql server then typing these command
mysql -u root -p roundcubedb < /var/www/webmail/SQL/mysql.initial.sql
To start the installation of Roundcube, open chrome or firefox browser, on address bar type :
http://localhost/webmail/installer/
In Ubuntu 12.04 I had to change my /etc/php5/apache2/php.ini file because of an error I got on the installer webpage of Roundcube.
In /etc/php5/apache2/php.ini change the line :
mbstring.func_overload = 7
to
mbstring.func_overload = 0
Enter your own configuration you want to use (SMTP & IMAP settings, etc.). Then scroll down and fill your MySQL database details you have already created.
Download file main.inc.php & db.inc.php and copy to directory /var/www/webmail/config
sudo cp main.inc.php db.inc.php /var/www/webmail/config
Installation Roundcube Webmail complete, remove the directory /var/www/webmail/installer:
sudo rm -rf /var/www/webmail/installer
Roundcube Webmail ready to use, Access Roundcube Webmail via browser (http://localhost/webmail/).
Greetz, M.