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 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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 https://github.com/roundcube/roundcubemail/wiki
  6. REQUIREMENTS
  7. ============
  8. * An IMAP, HTTP and SMTP server
  9. * .htaccess support allowing overrides for DirectoryIndex
  10. * PHP Version 5.4 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. - Iconv, Zip, Fileinfo, Intl, Exif (recommended)
  14. - LDAP for LDAP addressbook support (optional)
  15. - GD, Imagick (optional thumbnails generation, QR-code)
  16. * PEAR and PEAR packages distributed with Roundcube or external:
  17. - Mail_Mime 1.10.0 or newer
  18. - Net_SMTP 1.7.1 or newer
  19. - Net_Socket 1.0.12 or newer
  20. - Net_IDNA2 0.1.1 or newer
  21. - Auth_SASL 1.0.6 or newer
  22. - Net_Sieve 1.3.2 or newer (for managesieve plugin)
  23. - Crypt_GPG 1.6.0 or newer (for enigma plugin)
  24. - Endroid/QrCode 1.6.0 or newer (https://github.com/endroid/QrCode)
  25. * php.ini options (see .htaccess file):
  26. - error_reporting E_ALL & ~E_NOTICE & ~E_STRICT
  27. - memory_limit > 16MB (increase as suitable to support large attachments)
  28. - file_uploads enabled (for attachment upload features)
  29. - session.auto_start disabled
  30. - suhosin.session.encrypt disabled
  31. - mbstring.func_overload disabled
  32. * A MySQL, PostgreSQL, MS SQL Server (2005 or newer), Oracle database
  33. or SQLite support in PHP - with permission to create tables
  34. * Composer installed either locally or globally (https://getcomposer.org)
  35. INSTALLATION
  36. ============
  37. 1. Decompress and put this folder somewhere inside your document root
  38. 2. In case you don't use the so-called "complete" release package,
  39. you have to install PHP and javascript dependencies.
  40. 2.1. Install PHP dependencies using composer:
  41. - get composer from https://getcomposer.org/download/
  42. - rename the composer.json-dist file into composer.json
  43. - if you want to use LDAP address books, enable the LDAP libraries in your
  44. composer.json file by moving the items from "suggest" to the "require"
  45. section (remove the explanation texts after the version!).
  46. - run `php composer.phar install --no-dev`
  47. 2.2. Install Javascript dependencies by executing `bin/install-jsdeps.sh` script.
  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 https://github.com/roundcube/roundcubemail/issues/4078.
  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 https://github.com/roundcube/roundcubemail/wiki/Installation
  120. for even more 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 5M
  124. php_value post_max_size 6M
  125. SECURE YOUR INSTALLATION
  126. ========================
  127. Access through the webserver to the following directories should be denied:
  128. /config
  129. /temp
  130. /logs
  131. Roundcube uses .htaccess files to protect these directories, so be sure to
  132. allow override of the Limit directives to get them taken into account. The
  133. package also ships a .htaccess file in the root directory which defines some
  134. rewrite rules. In order to properly secure your installation, please enable
  135. mod_rewrite for Apache webserver and double check access to the above listed
  136. directories and their contents is denied.
  137. NOTE: In Apache 2.4, support for .htaccess files has been disabled by
  138. default. Therefore you first need to enable this in your Apache main or
  139. virtual host config by with:
  140. AllowOverride all
  141. For non-apache web servers add equivalent configuration parameters to deny
  142. direct access to these private resources.
  143. It is also recommended to change the document root to <install path>/public_html
  144. after installation if Roundcube runs at root of a dedicated virtual host. This
  145. will automatically keep sensitive files out of reach for http requests.
  146. UPGRADING
  147. =========
  148. If you already have a previous version of Roundcube installed,
  149. please refer to the instructions in UPGRADING guide.
  150. OPTIMISING
  151. ==========
  152. There are two forms of optimisation here, compression and caching, both aimed
  153. at increasing an end user's experience using Roundcube Webmail. Compression
  154. allows the static web pages to be delivered with less bandwidth. The index.php
  155. of Roundcube Webmail already enables compression on its output. The settings
  156. below allow compression to occur for all static files. Caching sets HTTP
  157. response headers that enable a user's web client to understand what is static
  158. and how to cache it.
  159. The caching directives used are:
  160. * Etags - sets at tag so the client can request is the page has changed
  161. * Cache-control - defines the age of the page and that the page is 'public'
  162. This enables clients to cache javascript files that don't have private
  163. information between sessions even if using HTTPS. It also allows proxies
  164. to share the same cached page between users.
  165. * Expires - provides another hint to increase the lifetime of static pages.
  166. For more information refer to RFC 2616.
  167. Side effects:
  168. -------------
  169. These directives are designed for production use. If you are using this in
  170. a development environment you may get horribly confused if your webclient
  171. is caching stuff that you changed on the server. Disabling the expires
  172. parts below should save you some grief.
  173. If you are changing the skins, it is recommended that you copy content to
  174. a different directory apart from 'default'.
  175. Apache:
  176. -------
  177. To enable these features in apache the following modules need to be enabled:
  178. * mod_deflate
  179. * mod_expires
  180. * mod_headers
  181. The optimisation is already included in the .htaccess file in the top
  182. directory of your installation.
  183. If you are using Apache version 2.2.9 and later, in the .htaccess file
  184. change the 'append' word to 'merge' for a more correct response. Keeping
  185. as 'append' shouldn't cause any problems though changing to merge will
  186. eliminate the possibility of duplicate 'public' headers in Cache-control.
  187. Lighttpd:
  188. ---------
  189. With Lightty the addition of Expire: tags by mod_expire is incompatible with
  190. the addition of "Cache-control: public". Using Cache-control 'public' is
  191. used below as it is assumed to give a better caching result.
  192. Enable modules in server.modules:
  193. "mod_setenv"
  194. "mod_compress"
  195. Mod_compress is a server side cache of compressed files to improve its performance.
  196. $HTTP["host"] == "www.example.com" {
  197. static-file.etags = "enable"
  198. # http://redmine.lighttpd.net/projects/lighttpd/wiki/Etag.use-mtimeDetails
  199. etag.use-mtime = "enable"
  200. # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSetEnv
  201. $HTTP["url"] =~ "^/roundcubemail/(plugins|skins|program)" {
  202. setenv.add-response-header = ( "Cache-Control" => "public, max-age=2592000")
  203. }
  204. # http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCompress
  205. # set compress.cache-dir to somewhere outside the docroot.
  206. compress.cache-dir = var.statedir + "/cache/compress"
  207. compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml", "image/gif", "image/png")
  208. }
  209. KNOWN ISSUES
  210. ============
  211. Installations with uw-imap server should set imap_disabled_caps = array('ESEARCH')
  212. in main configuration file. ESEARCH implementation in this server is broken (#1489184).