In this tutorial we will help you install Roundcube Webmail in Ubuntu 11.10/12.04 or any other Ubuntu version (11.04/10.10/10.04/Ubuntu Server). As a reminder, Roundcube Webmail is simply a webmail software written in PHP that can be used as e-mail client for managing your mail accounts. Roundcube is rich of features and configuration options, you can find them all here.

Before we start the tutorial, you need to install a web server on Ubuntu (Apache, PHP, MySQL, etc.). You can find here a tutorial explaining how to install a LAMP server.

Roundcube Webmail Installation

After installing the LAMP web server on your system, you can now follow these instructions to install Roundcube Webmail on Ubuntu:

1. Creating A MySQL Database & User

  Note: You can skip this first step if you want to install and create a MySQL database and user using phpMyAdmin.

- Open the terminal and run this command to sign in to your MySQL server (use the MySQL password you have entered during the installation of the LAMP server):

mysql -u root -p

- We will create a database for Roundcube Webmail called "roundcube" using this command (you can rename it to whatever you want):

create database roundcube;

- Create now a MySQL user with this commad (for this example, I have selected the same database name for this user.):

CREATE USER roundcube;

-  Give this user a password with this command:

SET PASSWORD FOR 'roundcube' = PASSWORD('12345');

          Replace text marked in red with your own username and password.

-  Grant now this user all access privileges for this new database with this command:

GRANT ALL PRIVILEGES ON roundcube.* TO 'roundcube' IDENTIFIED BY '12345';

- Exit now the MySQL server with this command:

exit

2. Installing Roundcube Webmail

Note: We will install Roundcube Webmail in the /var/www/webmail directory, you can rename webmail to whatever you want.

- Via the terminal, download and extract the script files to the /var/www/webmail folder with the following commands:

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

- Make now these folders writable using these commands:

sudo chown -R www-data.www-data /var/www/webmail/temp


sudo chown -R www-data.www-data /var/www/webmail/logs

- Import now the MySQL file of RoundCube with this command:

mysql roundcube < /var/www/webmail/SQL/mysql.initial.sql

- To start the installation of Roundcube, open one of these links:

http://127.0.0.1/webmail/installer/

or

http://localhost/webmail/installer/

- In the welcome page, click START INSTALLATION:



- Click Next:



- In the next page, you need to enter your own configuration you want to use (SMTP & IMAP settings, etc.). If you want to manage your Gmail account with Roundcube Webmail, you can check this page for Gmail SMTP & IMAP settings. Then scroll down and fill your MySQL database details you have already created:


When you finish, click CREATE CONFIG.

- Two files will be generated: main.inc.php & db.inc.php, download and place them in the /var/www/webmail/config directory:


Then click Continue.

- The installation is now complete, remove the "installer" folder with this command:

sudo rm -r  /var/www/webmail/installer

- You can now access Roundcube Webmail with one of these links, then sign in using your mail access details (Gmail, Yahoo, etc.) to start managing your e-mail contacts:

http://127.0.0.1/webmail/

or

http://localhost/webmail/


- To edit the config file that contains the MYSQL details as well as other confiig options, you can edit later the db.inc.php file with this command:

sudo gedit /var/www/webmail/config/db.inc.php

That's it!
 
Top