From 74bc89efc3b7f236e8bbb5bc767c4b5c224f7c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 24 Oct 2023 15:29:06 +0200 Subject: [PATCH] Add documentation for ini values and improve the one for modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- admin_manual/installation/index.rst | 1 + .../installation/php_configuration.rst | 132 ++++++++++++++++++ .../installation/source_installation.rst | 115 +-------------- 3 files changed, 136 insertions(+), 112 deletions(-) create mode 100644 admin_manual/installation/php_configuration.rst diff --git a/admin_manual/installation/index.rst b/admin_manual/installation/index.rst index 4ee820a75..b8865943c 100644 --- a/admin_manual/installation/index.rst +++ b/admin_manual/installation/index.rst @@ -7,6 +7,7 @@ Installation and server configuration system_requirements deployment_recommendations + php_configuration source_installation installation_wizard command_line_installation diff --git a/admin_manual/installation/php_configuration.rst b/admin_manual/installation/php_configuration.rst new file mode 100644 index 000000000..1fc84a1fc --- /dev/null +++ b/admin_manual/installation/php_configuration.rst @@ -0,0 +1,132 @@ +=========================== +PHP Modules & Configuration +=========================== + +PHP Modules +----------- + +This +section lists all required and optional PHP modules. Consult the `PHP manual +`_ for more information on modules. +You can +check the presence of a module by typing ``php -m | grep -i ``. +If you get a result, the module is present. + +Required: + +* PHP (see :doc:`./system_requirements` for a list of supported versions) +* PHP module ctype +* PHP module curl +* PHP module dom +* PHP module fileinfo (included with PHP) +* PHP module filter (only on Mageia and FreeBSD) +* PHP module GD +* PHP module hash (only on FreeBSD) +* PHP module JSON (included with PHP >= 8.0) +* PHP module libxml (Linux package libxml2 must be >=2.7.0) +* PHP module mbstring +* PHP module openssl (included with PHP >= 8.0) +* PHP module posix +* PHP module session +* PHP module SimpleXML +* PHP module XMLReader +* PHP module XMLWriter +* PHP module zip +* PHP module zlib + +Database connectors (pick the one for your database:) + +* PHP module pdo_sqlite (>= 3, usually not recommended for performance reasons) +* PHP module pdo_mysql (MySQL/MariaDB) +* PHP module pdo_pgsql (PostgreSQL) + +*Recommended* packages: + +* PHP module bz2 (recommended, required for extraction of apps) +* PHP module intl (increases language translation performance and fixes sorting + of non-ASCII characters) +* PHP module sodium (for Argon2 for password hashing. bcrypt is used as fallback, but if passwords were hashed with Argon2 already and the module is missing, your users can't log in.) + +Required for specific apps: + +* PHP module ldap (for LDAP integration) +* PHP module smbclient (SMB/CIFS integration, see + :doc:`../configuration_files/external_storage/smb`) +* PHP module ftp (for FTP storage / external user authentication) +* PHP module imap (for external user authentication) +* PHP module bcmath (for passwordless login) +* PHP module gmp (for passwordless login) + +Recommended for specific apps (*optional*): + +* PHP module gmp (for SFTP storage) +* PHP module exif (for image rotation in pictures app) + +For enhanced server performance (*optional*) select one of the following +memcaches: + +* PHP module apcu (>= 4.0.6) +* PHP module memcached +* PHP module redis (>= 2.2.6, required for Transactional File Locking) + +See :doc:`../configuration_server/caching_configuration` to learn how to select +and configure a memcache. + +For preview generation (*optional*): + +* PHP module imagick +* avconv or ffmpeg +* OpenOffice or LibreOffice + +.. note:: + If the preview generation of PDF files fails with a "not authorized" error message, you must adjust the imagick policy file. + See https://cromwell-intl.com/open-source/pdf-not-authorized.html + +For command line processing (*optional*): + +* PHP module pcntl (enables command interruption by pressing ``ctrl-c``) + +.. note:: + You also need to ensure that ``pcntl_signal`` and ``pcntl_signal_dispatch`` are not disabled + in your php.ini by the ``disable_functions`` option. + +For command line updater (*optional*): + +* PHP module phar (upgrades Nextcloud by running ``sudo -u www-data php /var/www/nextcloud/updater/updater.phar``) + +ini values +---------- + +The following ini settings should be adapted if needed for Nextcloud: + +* ``apc.enable_cli``: See :doc:`../configuration_server/caching_configuration` +* ``disable_functions``: Avoid disabling functions unless you know exactly what you are doing +* ``max_execution_time``: See :doc:`../configuration_files/big_file_upload_configuration` +* ``memory_limit``: Should at least 512MB. See also :doc:`../configuration_files/big_file_upload_configuration` +* ``opcache.enable`` and friends: See :doc:`../configuration_server/caching_configuration` and :doc:`server_tuning` +* ``open_basedir``: See :doc:`harden_server` +* ``upload_tmp_dir``: See :doc:`../configuration_files/big_file_upload_configuration` + +.. _php_ini_tips_label: + +php.ini configuration notes +--------------------------- + +Keep in mind that changes to ``php.ini`` may have to be configured on more than one +ini file. This can be the case, for example, for the ``date.timezone`` setting. + +**php.ini - used by the Web server:** +:: + + /etc/php/8.0/apache2/php.ini + or + /etc/php/8.0/fpm/php.ini + or ... + +**php.ini - used by the php-cli and so by Nextcloud CRON jobs:** +:: + + /etc/php/8.0/cli/php.ini + +.. note:: Path names have to be set in respect of the installed PHP + (8.0, 8.1 or 8.2) as applicable. diff --git a/admin_manual/installation/source_installation.rst b/admin_manual/installation/source_installation.rst index 2eef2567c..483f31e1b 100644 --- a/admin_manual/installation/source_installation.rst +++ b/admin_manual/installation/source_installation.rst @@ -32,94 +32,9 @@ This installation guide is giving a general overview of required dependencies an Prerequisites for manual installation ------------------------------------- -The Nextcloud .tar archive contains all of the required PHP modules. This -section lists all required and optional PHP modules. Consult the `PHP manual -`_ for more information on modules. -Your Linux distribution should have packages for all required modules. You can -check the presence of a module by typing ``php -m | grep -i ``. -If you get a result, the module is present. - -Required: - -* PHP (see :doc:`./system_requirements` for a list of supported versions) -* PHP module ctype -* PHP module curl -* PHP module dom -* PHP module fileinfo (included with PHP) -* PHP module filter (only on Mageia and FreeBSD) -* PHP module GD -* PHP module hash (only on FreeBSD) -* PHP module JSON (included with PHP >= 8.0) -* PHP module libxml (Linux package libxml2 must be >=2.7.0) -* PHP module mbstring -* PHP module openssl (included with PHP >= 8.0) -* PHP module posix -* PHP module session -* PHP module SimpleXML -* PHP module XMLReader -* PHP module XMLWriter -* PHP module zip -* PHP module zlib - -Database connectors (pick the one for your database:) - -* PHP module pdo_sqlite (>= 3, usually not recommended for performance reasons) -* PHP module pdo_mysql (MySQL/MariaDB) -* PHP module pdo_pgsql (PostgreSQL) - -*Recommended* packages: - -* PHP module bz2 (recommended, required for extraction of apps) -* PHP module intl (increases language translation performance and fixes sorting - of non-ASCII characters) -* PHP module sodium (for Argon2 for password hashing. bcrypt is used as fallback, but if passwords were hashed with Argon2 already and the module is missing, your users can't log in.) - -Required for specific apps: - -* PHP module ldap (for LDAP integration) -* PHP module smbclient (SMB/CIFS integration, see - :doc:`../configuration_files/external_storage/smb`) -* PHP module ftp (for FTP storage / external user authentication) -* PHP module imap (for external user authentication) -* PHP module bcmath (for passwordless login) -* PHP module gmp (for passwordless login) - -Recommended for specific apps (*optional*): - -* PHP module gmp (for SFTP storage) -* PHP module exif (for image rotation in pictures app) - -For enhanced server performance (*optional*) select one of the following -memcaches: - -* PHP module apcu (>= 4.0.6) -* PHP module memcached -* PHP module redis (>= 2.2.6, required for Transactional File Locking) - -See :doc:`../configuration_server/caching_configuration` to learn how to select -and configure a memcache. - -For preview generation (*optional*): - -* PHP module imagick -* avconv or ffmpeg -* OpenOffice or LibreOffice - -.. note:: - If the preview generation of PDF files fails with a "not authorized" error message, you must adjust the imagick policy file. - See https://cromwell-intl.com/open-source/pdf-not-authorized.html - -For command line processing (*optional*): - -* PHP module pcntl (enables command interruption by pressing ``ctrl-c``) - -.. note:: - You also need to ensure that ``pcntl_signal`` and ``pcntl_signal_dispatch`` are not disabled - in your php.ini by the ``disable_functions`` option. - -For command line updater (*optional*): - -* PHP module phar (upgrades Nextcloud by running ``sudo -u www-data php /var/www/nextcloud/updater/updater.phar``) +The Nextcloud .tar archive contains all of the required PHP modules. +Your Linux distribution should have packages for all required modules. +See :doc:`php_configuration` for a list of required and suggested modules. You don’t need the WebDAV module for your Web server (i.e. Apache’s ``mod_webdav``), as Nextcloud has a built-in WebDAV server of its own, @@ -317,30 +232,6 @@ SELinux configuration tips See :doc:`selinux_configuration` for a suggested configuration for SELinux-enabled distributions such as Fedora and CentOS. -.. _php_ini_tips_label: - -php.ini configuration notes ---------------------------- - -Keep in mind that changes to ``php.ini`` may have to be configured on more than one -ini file. This can be the case, for example, for the ``date.timezone`` setting. - -**php.ini - used by the Web server:** -:: - - /etc/php/8.0/apache2/php.ini - or - /etc/php/8.0/fpm/php.ini - or ... - -**php.ini - used by the php-cli and so by Nextcloud CRON jobs:** -:: - - /etc/php/8.0/cli/php.ini - -.. note:: Path names have to be set in respect of the installed PHP - (8.0, 8.1 or 8.2) as applicable. - .. _php_fpm_tips_label: php-fpm configuration notes