RoundCube Webmail
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
10 KiB

20 years ago
16 years ago
16 years ago
16 years ago
20 years ago
20 years ago
20 years ago
  1. INTRODUCTION
  2. ============
  3. This file describes the basic steps to install Roundcube Webmail on your
  4. web server. For additional information, please also consult the project's
  5. wiki page at http://trac.roundcube.net/wiki
  6. REQUIREMENTS
  7. ============
  8. * The Apache, Lighttpd, Cherokee or Hiawatha web server
  9. * .htaccess support allowing overrides for DirectoryIndex
  10. * PHP Version 5.3.7 or greater including:
  11. - PCRE, DOM, JSON, Session, Sockets, OpenSSL, Mbstring (required)
  12. - PHP PDO with driver for either MySQL, PostgreSQL, SQL Server, Oracle or SQLite (required)
  13. - Libiconv, Zip, Fileinfo, Intl, Exif (recommended)
  14. - LDAP for LDAP addressbook support (optional)
  15. * PEAR and PEAR packages distributed with Roundcube or external:
  16. - Mail_Mime 1.10.0 or newer
  17. - Net_SMTP 1.7.1 or newer
  18. - Net_Socket 1.0.12 or newer
  19. - Net_IDNA2 0.1.1 or newer
  20. - Auth_SASL 1.0.6 or newer
  21. - Net_Sieve 1.3.2 or newer (for managesieve plugin)
  22. - Crypt_GPG 1.4.3 or newer (for enigma plugin)
  23. * php.ini options (see .htaccess file):
  24. - error_reporting E_ALL & ~E_NOTICE (or lower)
  25. - memory_limit > 16MB (increase as suitable to support large attachments)
  26. - file_uploads enabled (for attachment upload features)
  27. - session.auto_start disabled
  28. - suhosin.session.encrypt disabled
  29. - mbstring.func_overload disabled
  30. - magic_quotes_runtime disabled
  31. - magic_quotes_sybase disabled
  32. - register_globals disabled (PHP < 5.4)
  33. * A MySQL (4.0.8 or newer), PostgreSQL, MS SQL Server (2005 or newer), Oracle
  34. database or SQLite support in PHP
  35. * One of the above databases with permission to create tables
  36. * An SMTP server (recommended) or PHP configured for mail delivery
  37. * Composer installed either locally or globally (https://getcomposer.org)
  38. INSTALLATION
  39. ============
  40. 1. Decompress and put this folder somewhere inside your document root
  41. 2. Install dependencies using composer:
  42. - get composer from https://getcomposer.org/download/
  43. - rename the composer.json-dist file into composer.json
  44. - if you want to use LDAP address books, enable the LDAP libraries in your
  45. composer.json file by moving the items from "suggest" to the "require"
  46. section (remove the explanation texts after the version!).
  47. - run `php composer.phar install --no-dev`
  48. 3. Make sure that the following directories (and the files within)
  49. are writable by the webserver
  50. - /temp
  51. - /logs
  52. 4. Create a new database and a database user for Roundcube (see DATABASE SETUP)
  53. 5. Point your browser to http://url-to-roundcube/installer/
  54. 6. Follow the instructions of the install script (or see MANUAL CONFIGURATION)
  55. 7. After creating and testing the configuration, remove the installer directory
  56. 8. Check Known Issues section of this file
  57. CONFIGURATION HINTS
  58. ===================
  59. IMPORTANT! Read all comments in defaults.inc.php, understand them
  60. and configure your installation to be not surprised by default behaviour.
  61. Roundcube writes internal errors to the 'errors' log file located in the logs
  62. directory which can be configured in config/config.inc.php. If you want ordinary
  63. PHP errors to be logged there as well, enable the 'php_value error_log' line
  64. in the .htaccess file and set the path to the log file accordingly.
  65. By default the session_path settings of PHP are not modified by Roundcube.
  66. However if you want to limit the session cookies to the directory where
  67. Roundcube resides you can uncomment and configure the according line
  68. in the .htaccess file.
  69. DATABASE SETUP
  70. ==============
  71. Note: Database for Roundcube must use UTF-8 character set.
  72. Note: See defaults.inc.php file for examples of DSN configuration.
  73. * MySQL
  74. -------
  75. Setting up the mysql database can be done by creating an empty database,
  76. importing the table layout and granting the proper permissions to the
  77. roundcube user. Here is an example of that procedure:
  78. # mysql
  79. > CREATE DATABASE roundcubemail /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
  80. > GRANT ALL PRIVILEGES ON roundcubemail.* TO roundcube@localhost
  81. IDENTIFIED BY 'password';
  82. > quit
  83. # mysql roundcubemail < SQL/mysql.initial.sql
  84. Note 1: 'password' is the master password for the roundcube user. It is strongly
  85. recommended you replace this with a more secure password. Please keep in
  86. mind: You need to specify this password later in 'config/db.inc.php'.
  87. * SQLite
  88. --------
  89. Versions of sqlite database engine older than 3 aren't supported.
  90. Database file and structure is created automatically by Roundcube.
  91. Make sure your configuration points to some file location and that the
  92. webserver can write to the file and the directory containing the file.
  93. * PostgreSQL
  94. ------------
  95. To use Roundcube with PostgreSQL support you have to follow these
  96. simple steps, which have to be done as the postgres system user (or
  97. which ever is the database superuser):
  98. $ createuser -P roundcube
  99. $ createdb -O roundcube -E UNICODE roundcubemail
  100. $ psql -U roundcube -f SQL/postgres.initial.sql roundcubemail
  101. Note: in some system configurations you might need to add '-U postgres' to
  102. createuser and createdb commands.
  103. * Microsoft SQL Server
  104. ----------------------
  105. Language/locale of the database must be set to us_english (1033). More info
  106. on this at http://trac.roundcube.net/ticket/1488918.
  107. Database cleaning
  108. -----------------
  109. To keep your database slick and clean we recommend to periodically execute
  110. bin/cleandb.sh which finally removes all records that are marked as deleted.
  111. Best solution is to install a cronjob running this script daily.
  112. MANUAL CONFIGURATION
  113. ====================
  114. First of all, copy the sample configuration file config/config.inc.php.sample
  115. to config/config.inc.php and make the necessary adjustments according to your
  116. environment and your needs. More configuration options can be copied from the
  117. config/defaults.inc.php file into your local config.inc.php file as needed.
  118. Read the comments above the individual configuration options to find out what
  119. they do or read http://trac.roundcube.net/wiki/Howto_Install for even more
  120. guidance.
  121. You can also modify the default .htaccess file. This is necessary to
  122. increase the allowed size of file attachments, for example:
  123. php_value upload_max_filesize 2M
  124. SECURE YOUR INSTALLATION
  125. ========================
  126. Access through the webserver to the following directories should be denied:
  127. /config
  128. /temp
  129. /logs
  130. Roundcube uses .htaccess files to protect these directories, so be sure to
  131. allow override of the Limit directives to get them taken into account. The
  132. package also ships a .htaccess file in the root directory which defines some
  133. rewrite rules. In order to properly secure your installation, please enable
  134. mod_rewrite for Apache webserver and double check access to the above listed
  135. directories and their contents is denied.
  136. NOTE: In Apache 2.4, support for .htaccess files has been disabled by
  137. default. Therefore you first need to enable this in your Apache main or
  138. virtual host config by with:
  139. AllowOverride all
  140. UPGRADING
  141. =========
  142. If you already have a previous version of Roundcube installed,
  143. please refer to the instructions in UPGRADING guide.
  144. OPTIMISING
  145. ==========
  146. There are two forms of optimisation here, compression and caching, both aimed
  147. at increasing an end user's experience using Roundcube Webmail. Compression
  148. allows the static web pages to be delivered with less bandwidth. The index.php
  149. of Roundcube Webmail already enables compression on its output. The settings
  150. below allow compression to occur for all static files. Caching sets HTTP
  151. response headers that enable a user's web client to understand what is static
  152. and how to cache it.
  153. The caching directives used are:
  154. * Etags - sets at tag so the client can request is the page has changed
  155. * Cache-control - defines the age of the page and that the page is 'public'
  156. This enables clients to cache javascript files that don't have private
  157. information between sessions even if using HTTPS. It also allows proxies
  158. to share the same cached page between users.
  159. * Expires - provides another hint to increase the lifetime of static pages.
  160. For more information refer to RFC 2616.
  161. Side effects:
  162. -------------
  163. These directives are designed for production use. If you are using this in
  164. a development environment you may get horribly confused if your webclient
  165. is caching stuff that you changed on the server. Disabling the expires
  166. parts below should save you some grief.
  167. If you are changing the skins, it is recommended that you copy content to
  168. a different directory apart from 'default'.
  169. Apache:
  170. -------
  171. To enable these features in apache the following modules need to be enabled:
  172. * mod_deflate
  173. * mod_expires
  174. * mod_headers
  175. The optimisation is already included in the .htaccess file in the top
  176. directory of your installation.
  177. If you are using Apache version 2.2.9 and later, in the .htaccess file
  178. change the 'append' word to 'merge' for a more correct response. Keeping
  179. as 'append' shouldn't cause any problems though changing to merge will
  180. eliminate the possibility of duplicate 'public' headers in Cache-control.
  181. Lighttpd:
  182. ---------
  183. With Lightty the addition of Expire: tags by mod_expire is incompatible with
  184. the addition of "Cache-control: public". Using Cache-control 'public' is
  185. used below as it is assumed to give a better caching result.
  186. Enable modules in server.modules:
  187. "mod_setenv"
  188. "mod_compress"
  189. Mod_compress is a server side cache of compressed files to improve its performance.
  190. $HTTP["host"] == "www.example.com" {
  191. static-file.etags = "enable"
  192. # http://redmine.lighttpd.net/projects/lighttpd/wiki/Etag.use-mtimeDetails
  193. etag.use-mtime = "enable"
  194. # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSetEnv
  195. $HTTP["url"] =~ "^/roundcubemail/(plugins|skins|program)" {
  196. setenv.add-response-header = ( "Cache-Control" => "public, max-age=2592000")
  197. }
  198. # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCompress
  199. # set compress.cache-dir to somewhere outside the docroot.
  200. compress.cache-dir = var.statedir + "/cache/compress"
  201. compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml", "image/gif", "image/png")
  202. }
  203. KNOWN ISSUES
  204. ============
  205. Installations with uw-imap server should set imap_disabled_caps = array('ESEARCH')
  206. in main configuration file. ESEARCH implementation in this server is broken (#1489184).