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.

INSTALL 9.7KB

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