We're here to assist with any of your needs, don't hestitate to reach out.
Roundcube is a free and open-source webmail client that provides a modern user interface for accessing emails on a mail server. It supports IMAP and SMTP protocols and is written in PHP, making it easily customizable and extensible. This guide will walk you through the installation process of Roundcube on CentOS 7.
Before we begin, let's make sure the server's package repositories are up to date:
# yum update
We need to install some required packages and extensions for Roundcube. Run the following command:
# yum install -y httpd mariadb-server php php-gd php-xml php-mbstring php-intl php-mysqlnd php-json
Start the Apache web server and MariaDB database server:
# systemctl start httpd # systemctl start mariadb
Enable them to start on boot:
# systemctl enable httpd # systemctl enable mariadb
Run the following command to secure your MariaDB installation:
# mysql_secure_installation
Answer the prompts and set a secure password for the root user.
Create a new database and user for Roundcube:
# mysql -u root -p MariaDB> CREATE DATABASE roundcubemail; MariaDB> GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'localhost' IDENTIFIED BY 'Your_Password'; MariaDB> FLUSH PRIVILEGES; MariaDB> EXIT;
Download the latest stable version of Roundcube from the official website or using the following command:
# wget https://github.com/roundcube/roundcubemail/releases/download/1.4.11/roundcubemail-1.4.11-complete.tar.gz
Extract the downloaded archive:
# tar xvf roundcubemail-1.4.11-complete.tar.gz
Move the extracted files to the web server's document root:
# mv roundcubemail-1.4.11 /var/www/html/roundcube
Rename the Roundcube configuration file:
# cd /var/www/html/roundcube # cp config/config.inc.php.sample config/config.inc.php
Edit the configuration file:
# nano config/config.inc.php
Update the following settings accordingly:
$config['db_dsnw'] = 'mysql://roundcube:Your_Password@localhost/roundcubemail'; $config['default_host'] = 'ssl://your_mail_server'; $config['smtp_server'] = 'tls://your_mail_server'; $config['smtp_user'] = '%u'; $config['smtp_pass'] = '%p';
Save and close the file.
Set the appropriate file permissions for Roundcube:
# chown -R apache:apache /var/www/html/roundcube
Create a new Apache configuration file for Roundcube:
# nano /etc/httpd/conf.d/roundcube.conf
Add the following content:
ServerName your_domain_name Redirect permanent / https://your_domain_name/ ServerName your_domain_name DocumentRoot /var/www/html/roundcube SSLEngine on SSLCertificateFile /path/to/ssl_certificate SSLCertificateKeyFile /path/to/ssl_certificate_key SSLCertificateChainFile /path/to/ssl_certificate_chain Options -Indexes +FollowSymLinks AllowOverride All Require all granted ErrorLog /var/log/httpd/roundcube-error.log CustomLog /var/log/httpd/roundcube-access.log combined
Save and close the file.
Restart the Apache web server:
# systemctl restart httpd
You can now access Roundcube webmail by visiting the URL https://your_domain_name/roundcube
in your web browser. Log in using your email credentials and start using Roundcube to manage your emails.
Congratulations! You have successfully installed Roundcube on CentOS 7.
What our customers say about us
Create your free account today.