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