How to Install Roundcube on Ubuntu 16.04

ubuntu-roundcube

Roundcube is a web based email client which can be used to access mails from any mail server like Dovecot and Postfix. It provides full functionality you expect from an email client, including MIME support, address book, folder manipulation, message searching and spell checking.

Perquisites: LAMP Server , Mail Server

Note: – If you want to see the Installation of LAMP Server, click on below Link:

How to Install Apache ,Mysql ,PHP ( LAMP ) Server on Ubuntu 16.04

Note: – If you want to see the Installation & Configuration of Mail Server, click on below Link:

How to Install Mail Server on Ubuntu 16.04(Part 1) ( Dovecot – Postfix – Roundcube )

Note: – Make sure to install the required packages of PHP for Roundcube:

apt-get install php-curl php-xml php-gettext php-cgi php-mysql libcurl3 libcurl3-dev php-mbstring php7.0-mbstring php-gettext -y

Step 1. Login to your Linux machine.

Step 2. Update packages.

# apt-get update

Step 3. Login Into your Mysql Server.

# mysql -u root -p

Step 4. Create a New Database for RoundCube.

mysql> Create database roundcubedb;

Step 5. Create a new User for RoundCube & specify the new Password for that user.

mysql> create user roundcube;
mysql> GRANT ALL PRIVILEGES ON roundcubedb.* TO ’roundcube’@’localhost’ IDENTIFIED BY ’roundpasswd’;
mysql> FLUSH PRIVILEGES;

Step 6. Exit from Mysql.

mysql> exit

Step 7. Move into your web server Document Root.

# cd /var/www/html

Step 8. Create a New Directory for Roundcube.

# mkdir roundcube

Step 9.  Download Roundcube Webmail by using below link.

# wget https://github.com/roundcube/roundcubemail/releases/download/1.3-beta/roundcubemail-1.3-beta-complete.tar.gz

Step 8. Extract roundcubemail-1.3-beta-complete.tar.gz.

# tar -xvzf roundcubemail-1.3-beta-complete.tar.gz

Step 9. Move to roundcubemail-1.3-beta directory.

# cd roundcubemail-1.3-beta

Step 10. Move the content of roundcubemail-1.3-beta to /var/www/html/roundcube.

# mv * /var/www/html/roundcube

Step 11. Make a copy of Roundcube config.inc.php.sample .

# cp /var/www/html/roundcube/config/config.inc.php.sample  /var/www/html/roundcube/config/config.inc.php

Step 12. Import database roundcubedb to mysql server by using below command.

# mysql -uroot -pmysqlpasswd roundcubedb < /var/www/html/roundcube/SQL/mysql.initial.sql

Step 13. Open config.inc.php file & Modify below lines.

# vim /var/www/html/roundcube/config/config.inc.php

$config[‘db_dsnw’] = ‘mysql://roundcube:[email protected]/roundcubedb’;
$config[‘default_host’] = ‘127.0.0.1’;
$config[‘smtp_server’] = ‘tls://127.0.0.1’;
$config[‘smtp_user’] = ‘%u’;
$config[‘smtp_pass’] = ‘%p’;

Step 14. Change the Permission of Roundcube Directory.

# chmod -R 755 /var/www/html/roundcube

Step 15. Restart your Webserver.

# service apache2 restart

Step 16. Search http://YourServerIp/roundcube through your browser.

roundcube-login-screen-page

Step 17. Specify the Username & Password of RoundCube in Login Box.After that click on Login button.

roundcube-dashboard-page-pic