Aleksander Machniak
2013-07-02 ed3e51f1b41d818ae757220fd41cdf0b093b20f6
commit | author | age
a89845 1 INTRODUCTION
T 2 ============
3
e019f2 4 This file describes the basic steps to install Roundcube Webmail on your
a89845 5 web server. For additional information, please also consult the project's
83ce4b 6 wiki page at http://trac.roundcube.net/wiki
T 7
4e17e6 8
535da2 9 REQUIREMENTS
T 10 ============
11
5d62d9 12 * The Apache, Lighttpd, Cherokee or Hiawatha web server
535da2 13 * .htaccess support allowing overrides for DirectoryIndex
d36115 14 * PHP Version 5.2.1 or greater including
a84efc 15    - PCRE, DOM, JSON, XML, Session, Sockets (required)
TB 16    - PHP Data Objects (PDO) with driver for either MySQL, PostgreSQL or SQLite (required)
738996 17      Note: MySQL database driver requires PHP 5.3 or newer.
a84efc 18    - Libiconv, Zip (recommended)
TB 19    - Fileinfo, Mcrypt, mbstring (optional)
91790e 20 * PEAR packages distributed with Roundcube or external:
53604a 21    - Mail_Mime 1.8.1 or newer
77c779 22    - Mail_mimeDecode 1.5.5 or newer
c4a226 23    - Net_SMTP (latest from https://github.com/pear/Net_SMTP/)
50d7d3 24    - Net_IDNA2 0.1.1 or newer
114cf1 25    - Auth_SASL 1.0.6 or newer
7d3406 26 * php.ini options (see .htaccess file):
535da2 27    - error_reporting E_ALL & ~E_NOTICE (or lower)
29640b 28    - memory_limit > 16MB (increase as suitable to support large attachments)
067763 29    - file_uploads enabled (for attachment upload features)
A 30    - session.auto_start disabled
31    - zend.ze1_compatibility_mode disabled
7d3406 32    - suhosin.session.encrypt disabled
A 33    - mbstring.func_overload disabled
140abb 34    - magic_quotes_runtime disabled
0b6d02 35    - magic_quotes_sybase disabled
3a01c3 36 * PHP compiled with OpenSSL to connect to IMAPS and to use the spell checker
ec6a77 37 * A MySQL (4.0.8 or newer), PostgreSQL, MS SQL Server (2005 or newer) database engine
d239ee 38   or SQLite support in PHP
1fb2c8 39 * One of the above databases with permission to create tables
7d3406 40 * An SMTP server (recommended) or PHP configured for mail delivery
535da2 41
T 42
4e17e6 43 INSTALLATION
T 44 ============
45
46 1. Decompress and put this folder somewhere inside your document root
10a699 47 2. Make sure that the following directories (and the files within)
T 48    are writable by the webserver
4e17e6 49    - /temp
T 50    - /logs
e019f2 51 3. Create a new database and a database user for Roundcube (see DATABASE SETUP)
967b34 52 4. Point your browser to http://url-to-roundcube/installer/
b8ae99 53 5. Follow the instructions of the install script (or see MANUAL CONFIGURATION)
190e97 54 6. After creating and testing the configuration, remove the installer directory
ed3e51 55 7. Check Known Issues section of this file
AM 56 8. Done!
42b113 57
T 58
4b20e2 59 CONFIGURATION HINTS
T 60 ===================
61
233622 62 Roundcube writes internal errors to the 'errors' log file located in the logs
4b20e2 63 directory which can be configured in config/main.inc.php. If you want ordinary
T 64 PHP errors to be logged there as well, enable the 'php_value error_log' line
65 in the .htaccess file and set the path to the log file accordingly.
66
29640b 67 By default the session_path settings of PHP are not modified by Roundcube.
T 68 However if you want to limit the session cookies to the directory where
69 Roundcube resides you can uncomment and configure the according line
70 in the .htaccess file.
71
4b20e2 72
10a699 73 DATABASE SETUP
T 74 ==============
75
233622 76 Note: Database for Roundcube must use UTF-8 character set.
0ba548 77
fa898a 78 * MySQL
T 79 -------
10a699 80 Setting up the mysql database can be done by creating an empty database,
T 81 importing the table layout and granting the proper permissions to the
82 roundcube user. Here is an example of that procedure:
83
84 # mysql
ad5600 85 > CREATE DATABASE roundcubemail /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
10a699 86 > GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
6ae6e4 87     IDENTIFIED BY 'password';
10a699 88 > quit
fa898a 89
10a699 90 # mysql roundcubemail < SQL/mysql.initial.sql
535da2 91
fa898a 92 Note 1: 'password' is the master password for the roundcube user. It is strongly
3cf664 93 recommended you replace this with a more secure password. Please keep in
T 94 mind: You need to specify this password later in 'config/db.inc.php'.
fa898a 95
1cded8 96
10a699 97 * SQLite
T 98 --------
50d515 99 You need sqlite 2 (preferably 2.8) to setup the sqlite db 
A 100 (sqlite 3.x also doesn't work at the moment). Here is
10a699 101 an example how you can setup the sqlite.db for roundcube:
T 102
103 # sqlite -init SQL/sqlite.initial.sql sqlite.db
d7f49d 104 Loading resources from SQL/sqlite.initial.sql
T 105 SQLite version 2.8.16
106 Enter ".help" for instructions
107 sqlite> .exit
108 # chmod o+rw sqlite.db
10a699 109
T 110 Make sure your configuration points to the sqlite.db file and that the
83ce4b 111 webserver can write to the file and the directory containing the file.
10a699 112
T 113
1cded8 114 * PostgreSQL
T 115 ------------
233622 116 To use Roundcube with PostgreSQL support you have to follow these
a89845 117 simple steps, which have to be done as the postgres system user (or
1cded8 118 which ever is the database superuser):
T 119
b91bc1 120 $ createuser -P roundcube
ad5600 121 $ createdb -O roundcube -E UNICODE roundcubemail
b91bc1 122 $ psql -U roundcube -f SQL/postgres.initial.sql roundcubemail
1cded8 123
b91bc1 124 Note: in some system configurations you might need to add '-U postgres' to
AM 125 createuser and createdb commands.
233622 126
T 127
c72f69 128 * Microsoft SQL Server
AM 129 ----------------------
130 Language/locale of the database must be set to us_english (1033). More info
131 on this at http://trac.roundcube.net/ticket/1488918.
132
133
233622 134 Database cleaning
T 135 -----------------
c72f69 136 To keep your database slick and clean we recommend to periodically execute
30aa4c 137 bin/cleandb.sh which finally removes all records that are marked as deleted.
233622 138 Best solution is to install a cronjob running this script daily.
1cded8 139
T 140
190e97 141 MANUAL CONFIGURATION
T 142 ====================
535da2 143
a89845 144 First of all, rename the files config/*.inc.php.dist to config/*.inc.php.
T 145 You can then change these files according to your environment and your needs.
146 Details about the config parameters can be found in the config files.
190e97 147 See http://trac.roundcube.net/wiki/Howto_Install for even more guidance.
535da2 148
4b9efb 149 You can also modify the default .htaccess file. This is necessary to
S 150 increase the allowed size of file attachments, for example:
151     php_value       upload_max_filesize     2M
535da2 152
83ce4b 153
42b113 154 UPGRADING
T 155 =========
6ae6e4 156
233622 157 If you already have a previous version of Roundcube installed,
42b113 158 please refer to the instructions in UPGRADING guide.
4e17e6 159
T 160
d7f49d 161 OPTIMISING
T 162 ==========
163
164 There are two forms of optimisation here, compression and caching, both aimed
233622 165 at increasing an end user's experience using Roundcube Webmail. Compression
d7f49d 166 allows the static web pages to be delivered with less bandwidth. The index.php
233622 167 of Roundcube Webmail already enables compression on its output. The settings
d7f49d 168 below allow compression to occur for all static files. Caching sets HTTP 
T 169 response headers that enable a user's web client to understand what is static
170 and how to cache it.
171
172 The caching directives used are:
173  * Etags - sets at tag so the client can request is the page has changed
174  * Cache-control - defines the age of the page and that the page is 'public'
175    This enables clients to cache javascript files that don't have private 
176    information between sessions even if using HTTPS. It also allows proxies
177    to share the same cached page between users.
178  * Expires - provides another hint to increase the lifetime of static pages.
179
180 For more information refer to RFC 2616.
181
182 Side effects:
183 -------------
184 These directives are designed for production use. If you are using this in
185 a development environment you may get horribly confused if your webclient
186 is caching stuff that you changed on the server. Disabling the expires 
187 parts below should save you some grief.
188
189 If you are changing the skins, it is recommended that you copy content to 
190 a different directory apart from 'default'.
191
192 Apache:
193 -------
194 To enable these features in apache the following modules need to be enabled:
a5c2ad 195  * mod_deflate
A 196  * mod_expires
d7f49d 197  * mod_headers
T 198
199 The optimisation is already included in the .htaccess file in the top 
200 directory of your installation.
201
202 If you are using Apache version 2.2.9 and later, in the .htaccess file
203 change the 'append' word to 'merge' for a more correct response. Keeping
204 as 'append' shouldn't cause any problems though changing to merge will 
205 eliminate the possibility of duplicate 'public' headers in Cache-control.
206
207 Lighttpd:
208 ---------
209 With Lightty the addition of Expire: tags by mod_expire is incompatible with
210 the addition of "Cache-control: public". Using Cache-control 'public' is 
211 used below as it is assumed to give a better caching result.
212
213 Enable modules in server.modules:
214     "mod_setenv"
215     "mod_compress"
216
217 Mod_compress is a server side cache of compressed files to improve its performance.
218
219 $HTTP["host"] == "www.example.com" {
220
221     static-file.etags = "enable"
222     # http://redmine.lighttpd.net/projects/lighttpd/wiki/Etag.use-mtimeDetails
223     etag.use-mtime = "enable"
224
225     # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSetEnv
226     $HTTP["url"] =~ "^/roundcubemail/(plugins|skins|program)" {
227         setenv.add-response-header  = ( "Cache-Control" => "public, max-age=2592000")
228     }
229
230     # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCompress
231     # set compress.cache-dir to somewhere outside the docroot.
232     compress.cache-dir   = var.statedir + "/cache/compress"
233
234     compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml", "image/gif", "image/png")
235 }
ed3e51 236
AM 237
238 KNOWN ISSUES
239 ============
240
241 Installations with uw-imap server should set imap_disabled_caps = array('ESEARCH')
242 in main configuration file. ESEARCH implementation in this server is broken (#1489184).