Home > English > Tutorials > How to install RoundCube on centos 6 ( web mail)

How to install RoundCube on centos 6 ( web mail)

 

I.Preparation

Install epel repository. Reference link here click here

Install LAMP . Reference link click here

1.Stop iptables service

# service iptables stop

2.Install dovecot

# yum install dovecot -y

Edit dovecot configuration

Edit the file dovecot.conf 

# nano /etc/dovecot/dovecot.conf 

listen = *

Edit the file 10-auth.conf 

# nano /etc/dovecot/conf.d/10-auth.conf

disable_plaintext_auth = no

auth_mechanisms = plain login

Edit the file 10-mail.conf ( remove the sign  '#' )

# nano /etc/dovecot/conf.d/10-mail.conf

mail_location = maildir:~/Maildir  

Edit the fix file 10-master.conf and add user and group

# nano /etc/dovecot/conf.d/10-master.conf 

# Postfix smtp-auth

unix_listener /var/spool/postfix/private/auth {
   mode = 0666

   user = postfix
    group = postfix 

}

Restart dovecot

# service dovecot start

Let dovecot start together with the system

# chkconfig dovecot on 

II.Proceeding

Creat a user to login and set a password for this user

# useradd maxserver

# passwd passmaxserver

Creat a database called roundcubemail and grant it the user

# mysql -u root -p

mysql> CREATE DATABASE roundcubemail;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL ON roundcubemail.* TO [email protected] IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> Ctrl-C -- exit!
Aborted
 

 

Download roundcube from the page  Click here

https://roundcube.net/

# mkdir /download

# cd /download

# wget https://downloads.sourceforge.net/project/roundcubemail/roundcubemail/1.1.4/roundcubemail-1.1.4-complete.tar.gz

Unzip the downloaded files and move them to the folder /var/www/html/

# tar -xvf roundcubemail-1.1.4-complete.tar.gz

# mv roundcubemail-1.1.4 /var/www/html/roundcubemail

Give access permission to these two folders 

# chmod 777 /var/www/html/roundcubemail/temp

# chmod 777 /var/www/html/roundcubemail/logs

Visit VPS IP  http://ip-vps/roundcubemail/installer/ you'll install on this web, just click on 'next'

Note: after installing you should delete the folder /var/www/html/roundcubemail/installer to prevent access from other people 

**Some errors during the installation

@rocube error
Fileinfo/mime_content_type configuration:  OK
Mimetype to file extension mapping:  NOT OK

#fix
download mime.types
wget http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
Configure the file config to point the link
$config['mime_types'] = '/home/nginx/mail.maxserver.com/public_html/config/mime.types';

@rocube error
roundcube login failed
không đăng nhập được
#fix 
Enable the functionality imap to remove the error and send records
// Log IMAP conversation to <log_dir>/imap or to syslog
$config['imap_debug'] = true;

@timezone php error
#php -i | grep php.ini  
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
PHP Warning:  Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
#fix 
nano /etc/php.ini
tìm date.timezone
fix 
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York
Here's the list of timezones that PHP supports, you can find the suitable zone for your private setting http://www.php.net/manual/en/timezones.php
# service httpd restart

@ roundcube error
SMTP Error (250): Authentication failed.
#fix
$ config ['smtp_user'] = '';