source: subversion/trunk/roundcubemail/INSTALL @ 5216

Last change on this file since 5216 was 5216, checked in by alec, 21 months ago
  • Require magic_quotes_runtime=Off because it modifies data streams (too much effort to handle this)
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.3 KB
Line 
1INTRODUCTION
2============
3
4This file describes the basic steps to install Roundcube Webmail on your
5web server. For additional information, please also consult the project's
6wiki page at http://trac.roundcube.net/wiki
7
8
9REQUIREMENTS
10============
11
12* The Apache or Lighttpd Webserver
13* .htaccess support allowing overrides for DirectoryIndex
14* PHP Version 5.2.1 or greater including
15   - PCRE, DOM, JSON, XML, Session, Sockets (required)
16   - libiconv (recommended)
17   - mbstring, fileinfo, mcrypt (optional)
18* PEAR packages distributed with Roundcube or external:
19   - MDB2 2.5.0 or newer
20   - Mail_Mime 1.8.1 or newer
21   - Net_SMTP 1.4.2 or newer
22   - Net_IDNA2 0.1.1 or newer
23   - Auth_SASL 1.0.3 or newer
24* php.ini options (see .htaccess file):
25   - error_reporting E_ALL & ~E_NOTICE (or lower)
26   - memory_limit > 16MB (increase as suitable to support large attachments)
27   - file_uploads enabled (for attachment upload features)
28   - session.auto_start disabled
29   - zend.ze1_compatibility_mode disabled
30   - suhosin.session.encrypt disabled
31   - mbstring.func_overload disabled
32   - magic_quotes_runtime disabled
33* PHP compiled with OpenSSL to connect to IMAPS and to use the spell checker
34* A MySQL (4.0.8 or newer), PostgreSQL, MSSQL database engine
35  or the SQLite extension for PHP
36* One of the above databases with permission to create tables
37* An SMTP server (recommended) or PHP configured for mail delivery
38
39
40INSTALLATION
41============
42
431. Decompress and put this folder somewhere inside your document root
442. Make sure that the following directories (and the files within)
45   are writable by the webserver
46   - /temp
47   - /logs
483. Create a new database and a database user for Roundcube (see DATABASE SETUP)
494. Point your browser to http://url-to-roundcube/installer/
505. Follow the instructions of the install script (or see MANUAL CONFIGURATION)
516. After creating and testing the configuration, remove the installer directory
527. Done!
53
54
55CONFIGURATION HINTS
56===================
57
58Roundcube writes internal errors to the 'errors' log file located in the logs
59directory which can be configured in config/main.inc.php. If you want ordinary
60PHP errors to be logged there as well, enable the 'php_value error_log' line
61in the .htaccess file and set the path to the log file accordingly.
62
63By default the session_path settings of PHP are not modified by Roundcube.
64However if you want to limit the session cookies to the directory where
65Roundcube resides you can uncomment and configure the according line
66in the .htaccess file.
67
68
69DATABASE SETUP
70==============
71
72Note: Database for Roundcube must use UTF-8 character set.
73
74* MySQL
75-------
76Setting up the mysql database can be done by creating an empty database,
77importing the table layout and granting the proper permissions to the
78roundcube user. Here is an example of that procedure:
79
80# mysql
81> CREATE DATABASE roundcubemail /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
82> GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
83    IDENTIFIED BY 'password';
84> quit
85
86# mysql roundcubemail < SQL/mysql.initial.sql
87
88Note 1: 'password' is the master password for the roundcube user. It is strongly
89recommended you replace this with a more secure password. Please keep in
90mind: You need to specify this password later in 'config/db.inc.php'.
91
92
93* SQLite
94--------
95You need sqlite 2 (preferably 2.8) to setup the sqlite db
96(sqlite 3.x also doesn't work at the moment). Here is
97an example how you can setup the sqlite.db for roundcube:
98
99# sqlite -init SQL/sqlite.initial.sql sqlite.db
100Loading resources from SQL/sqlite.initial.sql
101SQLite version 2.8.16
102Enter ".help" for instructions
103sqlite> .exit
104# chmod o+rw sqlite.db
105
106Make sure your configuration points to the sqlite.db file and that the
107webserver can write to the file and the directory containing the file.
108
109
110* PostgreSQL
111------------
112To use Roundcube with PostgreSQL support you have to follow these
113simple steps, which have to be done as the postgres system user (or
114which ever is the database superuser):
115
116$ createuser roundcube
117$ createdb -O roundcube -E UNICODE roundcubemail
118$ psql roundcubemail
119
120roundcubemail =# ALTER USER roundcube WITH PASSWORD 'the_new_password';
121roundcubemail =# \c - roundcube
122roundcubemail => \i SQL/postgres.initial.sql
123
124All this has been tested with PostgreSQL 8.x and 7.4.x. Older
125versions don't have a -O option for the createdb, so if you are
126using that version you'll have to change ownership of the DB later.
127
128
129Database cleaning
130-----------------
131Do keep your database slick and clean we recommend to periodically execute
132bin/cleandb.sh which finally removes all records that are marked as deleted.
133Best solution is to install a cronjob running this script daily.
134
135
136
137MANUAL CONFIGURATION
138====================
139
140First of all, rename the files config/*.inc.php.dist to config/*.inc.php.
141You can then change these files according to your environment and your needs.
142Details about the config parameters can be found in the config files.
143See http://trac.roundcube.net/wiki/Howto_Install for even more guidance.
144
145You can also modify the default .htaccess file. This is necessary to
146increase the allowed size of file attachments, for example:
147        php_value       upload_max_filesize     2M
148
149
150UPGRADING
151=========
152
153If you already have a previous version of Roundcube installed,
154please refer to the instructions in UPGRADING guide.
155
156
157OPTIMISING
158==========
159
160There are two forms of optimisation here, compression and caching, both aimed
161at increasing an end user's experience using Roundcube Webmail. Compression
162allows the static web pages to be delivered with less bandwidth. The index.php
163of Roundcube Webmail already enables compression on its output. The settings
164below allow compression to occur for all static files. Caching sets HTTP
165response headers that enable a user's web client to understand what is static
166and how to cache it.
167
168The caching directives used are:
169 * Etags - sets at tag so the client can request is the page has changed
170 * Cache-control - defines the age of the page and that the page is 'public'
171   This enables clients to cache javascript files that don't have private
172   information between sessions even if using HTTPS. It also allows proxies
173   to share the same cached page between users.
174 * Expires - provides another hint to increase the lifetime of static pages.
175
176For more information refer to RFC 2616.
177
178Side effects:
179-------------
180These directives are designed for production use. If you are using this in
181a development environment you may get horribly confused if your webclient
182is caching stuff that you changed on the server. Disabling the expires
183parts below should save you some grief.
184
185If you are changing the skins, it is recommended that you copy content to
186a different directory apart from 'default'.
187
188Apache:
189-------
190To enable these features in apache the following modules need to be enabled:
191 * mod_deflate
192 * mod_expires
193 * mod_headers
194
195The optimisation is already included in the .htaccess file in the top
196directory of your installation.
197
198If you are using Apache version 2.2.9 and later, in the .htaccess file
199change the 'append' word to 'merge' for a more correct response. Keeping
200as 'append' shouldn't cause any problems though changing to merge will
201eliminate the possibility of duplicate 'public' headers in Cache-control.
202
203Lighttpd:
204---------
205With Lightty the addition of Expire: tags by mod_expire is incompatible with
206the addition of "Cache-control: public". Using Cache-control 'public' is
207used below as it is assumed to give a better caching result.
208
209Enable modules in server.modules:
210    "mod_setenv"
211    "mod_compress"
212
213Mod_compress is a server side cache of compressed files to improve its performance.
214
215$HTTP["host"] == "www.example.com" {
216
217    static-file.etags = "enable"
218    # http://redmine.lighttpd.net/projects/lighttpd/wiki/Etag.use-mtimeDetails
219    etag.use-mtime = "enable"
220
221    # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSetEnv
222    $HTTP["url"] =~ "^/roundcubemail/(plugins|skins|program)" {
223        setenv.add-response-header  = ( "Cache-Control" => "public, max-age=2592000")
224    }
225
226    # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCompress
227    # set compress.cache-dir to somewhere outside the docroot.
228    compress.cache-dir   = var.statedir + "/cache/compress"
229
230    compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml", "image/gif", "image/png")
231}
232
233
Note: See TracBrowser for help on using the repository browser.