From LedHed's Wiki
Jump to: navigation, search
(Change Ownership & Premissions)
 
(11 intermediate revisions by the same user not shown)
Line 27: Line 27:
  
 
== Change Ownership & Premissions ==
 
== Change Ownership & Premissions ==
chown -R root.root roundcube/
+
chown -R root.root roundcube/<br>
cd roundbube/
+
cd roundbube/<br>
chmod 755 log/ temp/
+
chmod 755 log/ temp/<br>
 
+
  
 
== Database Setup ==
 
== Database Setup ==
Line 64: Line 63:
  
  
* Configure Database
+
* Configure Database Settings
 
vi db.inc.php
 
vi db.inc.php
  
''change this line:  $rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail'; to''
+
''change this line:  $rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';''
 +
 
 +
to
  
 
$rcmail_config['db_dsnw'] = 'mysql://roundcube:'''Your-Password-Here'''@localhost/'''roundcube'''';
 
$rcmail_config['db_dsnw'] = 'mysql://roundcube:'''Your-Password-Here'''@localhost/'''roundcube'''';
'''Note: I created the database as 'roundcube' but the sample database config calls it 'roundcubemail' change it where necessary''
 
  
 +
'''Note: I created the database as 'roundcube' but the sample database config calls it 'roundcubemail' change it where necessary'''
 +
 +
 +
* Configure Main Settings
 +
'''(NOTE: these are the settings I use, they may differ depending on your particular mail server configuration)'''
 +
 +
vi main.inc.php<br>
 +
 +
$rcmail_config['enable_caching'] = FALSE;<br>
 +
$rcmail_config['message_cache_lifetime'] = '1h';<br>
 +
$rcmail_config['default_host'] = 'ssl://localhost:993';<br>
 +
$rcmail_config['default_port'] = 993;<br>
 +
$rcmail_config['virtuser_file'] = 'mailbox';<br>
 +
$rcmail_config['virtuser_query'] = 'SELECT username FROM mailbox WHERE username = "%u"';<br>
 +
$rcmail_config['smtp_user'] = '%u';<br>
 +
$rcmail_config['smtp_pass'] = '%p';<br>
 +
$rcmail_config['smtp_auth_type'] = 'PLAIN';<br>
 +
 +
* Optional
 +
 +
$rcmail_config['pagesize'] = 100;<br>
 +
$rcmail_config['timezone'] = 4;<br>
  
  
 +
== Apache Configuration ==
 +
(''For more info on Apache go [[:Category:Apache|here]])''
  
  
 +
* Edit/Create your VHost file
 +
vi /etc/httpd/conf.d/roundcube.mydomain.conf
  
 +
----
 +
<nowiki>### Virtual Host roundcube.mydomain.com ###</nowiki><br>
 +
<br>
 +
<nowiki><VirtualHost *:80></nowiki><br>
 +
<br>
 +
<nowiki>&nbsp;&nbsp;        ServerName roundcube.mydomain.com</nowiki><br>
 +
<br>
 +
<nowiki>&nbsp;&nbsp;        RewriteEngine on</nowiki><br>
 +
<nowiki>&nbsp;&nbsp;        RewriteCond %{HTTP_HOST} ^roundcube\.mydomain\.com</nowiki><br>
 +
<nowiki>&nbsp;&nbsp;        RewriteRule ^/$ https://roundcube.mydomain.com [R,L]</nowiki><br>
 +
<br>
 +
<nowiki></VirtualHost></nowiki><br>
 +
<br>
 +
<nowiki>### SSL Virtual Host roundcube.mydomain.com ###</nowiki><br>
 +
<br>
 +
<nowiki><VirtualHost *:443></nowiki><br>
 +
<br>
 +
<nowiki>&nbsp;&nbsp;        ServerName roundcube.mydomain.com</nowiki><br>
 +
<nowiki>&nbsp;&nbsp;        DocumentRoot /var/www/roundcube/</nowiki><br>
 +
<nowiki>&nbsp;&nbsp;        DirectoryIndex index.php</nowiki><br>
 +
<br>
 +
<nowiki>&nbsp;&nbsp;        SSLEngine on</nowiki><br>
 +
<nowiki>&nbsp;&nbsp;        SSLCertificateFile /etc/pki/tls/certs/server.crt</nowiki><br>
 +
<nowiki>&nbsp;&nbsp;        SSLCertificateKeyFile /etc/pki/tls/certs/server.key</nowiki><br>
 +
<br>
 +
<nowiki>&nbsp;&nbsp;        <Directory "/var/www/roundcube/"></nowiki><br>
 +
<br>
 +
<nowiki>&nbsp;&nbsp;                SSLRequireSSL</nowiki><br>
 +
<br>
 +
<nowiki>&nbsp;&nbsp;                AllowOverride all</nowiki><br>
 +
<nowiki>&nbsp;&nbsp;                DirectoryIndex index.php</nowiki><br>
 +
<nowiki>&nbsp;&nbsp;                Allow from all</nowiki><br>
 +
<nowiki>&nbsp;&nbsp;                Order deny,allow</nowiki><br>
 +
<br>
 +
<nowiki>        </Directory></nowiki><br>
 +
<br>
 +
<nowiki></VirtualHost></nowiki><br>
 +
----
  
  
 +
== Trouble Shooting ==
 +
Getting a blank page when you try to connect?<br>
 +
Visit: http://roundcubeforum.net/index.php?topic=176.0
  
 +
Make sure all your database settings are correct.
 +
''(Database Name, Database Username, Password, SELECT Statements, Etc...)''
  
  
 
[[Category:RoundCube]]
 
[[Category:RoundCube]]

Latest revision as of 18:52, 7 February 2007

NOTE: This HowTo assumes you are using a RedHat or Fedora based distro, but most of this info can be applied to any Unix based Operating System.



Download

  • Download the latest version of Roundcube

wget http://easynews.dl.sourceforge.net/sourceforge/roundcubemail/roundcubemail-0.1beta.tar.gz

If the Above link is broken or out of date, get the latest version Here


UnTar

tar -xvzf roundcubemail-0.1beta.tar.gz


Move

mv roundcubemail-0.1beta /var/www/roundcube

Read the Documentation

cd /var/www/roundcube less README (press q to quit)

less INSTALL (press q to quit)

Change Ownership & Premissions

chown -R root.root roundcube/
cd roundbube/
chmod 755 log/ temp/

Database Setup

(This Assumes you already have MySQL installed)


  • Creating the RoundCube Database

mysql -u root -p (When prompted for a password enter the root password)

mysql> CREATE DATABASE `roundcube` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


  • Create RoundCube User and Grant Privileges

mysql> GRANT ALL PRIVILEGES ON roundcube.* TO roundcube@localhost IDENTIFIED BY 'Your-Password-Here';
(where 'Your-Password-Here' is the password you want for the roundcube user)


  • Exit MySQL

mysql> quit


  • Import RoundCube Database Tables

mysql -u root -p roundcube < /var/www/roundcube/SQL/mysql.initial.sql
(When prompted for a password enter the root password)


Initial Configuration

  • Copy the sample configuration file

cd config/ cp db.inc.php.dist db.inc.php cp main.inc.php.dist main.inc.php


  • Configure Database Settings

vi db.inc.php

change this line: $rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';

to

$rcmail_config['db_dsnw'] = 'mysql://roundcube:Your-Password-Here@localhost/roundcube';

Note: I created the database as 'roundcube' but the sample database config calls it 'roundcubemail' change it where necessary


  • Configure Main Settings

(NOTE: these are the settings I use, they may differ depending on your particular mail server configuration)

vi main.inc.php

$rcmail_config['enable_caching'] = FALSE;
$rcmail_config['message_cache_lifetime'] = '1h';
$rcmail_config['default_host'] = 'ssl://localhost:993';
$rcmail_config['default_port'] = 993;
$rcmail_config['virtuser_file'] = 'mailbox';
$rcmail_config['virtuser_query'] = 'SELECT username FROM mailbox WHERE username = "%u"';
$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p';
$rcmail_config['smtp_auth_type'] = 'PLAIN';

  • Optional

$rcmail_config['pagesize'] = 100;
$rcmail_config['timezone'] = 4;


Apache Configuration

(For more info on Apache go here)


  • Edit/Create your VHost file

vi /etc/httpd/conf.d/roundcube.mydomain.conf


### Virtual Host roundcube.mydomain.com ###

<VirtualHost *:80>

   ServerName roundcube.mydomain.com

   RewriteEngine on
   RewriteCond %{HTTP_HOST} ^roundcube\.mydomain\.com
   RewriteRule ^/$ https://roundcube.mydomain.com [R,L]

</VirtualHost>

### SSL Virtual Host roundcube.mydomain.com ###

<VirtualHost *:443>

   ServerName roundcube.mydomain.com
   DocumentRoot /var/www/roundcube/
   DirectoryIndex index.php

   SSLEngine on
   SSLCertificateFile /etc/pki/tls/certs/server.crt
   SSLCertificateKeyFile /etc/pki/tls/certs/server.key

   <Directory "/var/www/roundcube/">

   SSLRequireSSL

   AllowOverride all
   DirectoryIndex index.php
   Allow from all
   Order deny,allow

</Directory>

</VirtualHost>



Trouble Shooting

Getting a blank page when you try to connect?
Visit: http://roundcubeforum.net/index.php?topic=176.0

Make sure all your database settings are correct. (Database Name, Database Username, Password, SELECT Statements, Etc...)