====== RoundCube - Debian 7 ======
**No WebServer**
root@web-server:~# apt-get install roundcube roundcube-mysql
**Escolher não quando perguntar:** Configurar a base de dados para roundcube com dbconfig-common?.
==== Configurando o database ====
**No DBServer**
root@db-mysql:~# apt-get install mysql-server
Inserir um senha e confirmar nas perguntas do debconf.
root@db-mysql:~# vim /etc/mysql/my.cnf
[...]
#bind-address = 127.0.0.1
bind-address = *
[...]
root@db-mysql:~# service mysql restart
root@db-mysql:~# mysql -u root -p
mysql> CREATE DATABASE roundcubemail /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
mysql> GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'192.0.2.100' IDENTIFIED BY 'password';
mysql> quit
**No WebServer**
root@web-server:~# mysql -h 192.0.2.36 -u roundcube -p roundcubemail < /usr/share/dbconfig-common/data/roundcube/install/mysql
Enter password:
root@web-server:~# vim /etc/roundcube/debian-db.php
[...]
$dbuser='roundcube';
$dbpass='martins58';
$basepath='';
$dbname='roundcubemail';
$dbserver='192.0.2.36';
$dbport='3306';
$dbtype='mysql';
root@web-server:~# vim /etc/roundcube/main.inc.php
[...]
$rcmail_config['default_host'] = 'ssl://mail.exemplo.org';
$rcmail_config['default_port'] = 993;
[...]
$rcmail_config['smtp_server'] = 'mail.exemplo.org';
[...]
$rcmail_config['mail_domain'] = 'exemplo.org';
[...]
root@web-server:~# cat /etc/apache2/conf.d/roundcube
# Those aliases do not work properly with several hosts on your apache server
# Uncomment them to use it or adapt them to your configuration
# Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
# Alias /roundcube /var/lib/roundcube
ServerName webmail.exemplo.org
ServerAdmin webmaster@exemplo.org
DocumentRoot /usr/share/roundcube
# Access to tinymce files
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
Options +FollowSymLinks
# This is needed to parse /var/lib/roundcube/.htaccess. See its
# content before setting AllowOverride to None.
AllowOverride All
order allow,deny
allow from all
# Protecting basic directories:
Options -FollowSymLinks
AllowOverride None
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
ErrorLog /var/log/apache2/webmail-error_log
CustomLog /var/log/apache2/webmail-access_log common
root@web-server:~# service apache2 restart