From 65d58384495cbb879ac73d7eb7446e302e760bee Mon Sep 17 00:00:00 2001 From: michag86 Date: Tue, 14 Mar 2017 19:57:20 +0100 Subject: [PATCH 1/2] PHP upgrade for 5.6 and 7.0 --- admin_manual/installation/index.rst | 4 +- .../installation/php_54_installation.rst | 70 --------------- .../installation/php_55_installation.rst | 86 ------------------- .../installation/php_56_installation.rst | 82 ++++++++++++++++++ .../installation/php_70_installation.rst | 86 +++++++++++++++++++ 5 files changed, 170 insertions(+), 158 deletions(-) delete mode 100644 admin_manual/installation/php_54_installation.rst delete mode 100644 admin_manual/installation/php_55_installation.rst create mode 100644 admin_manual/installation/php_56_installation.rst create mode 100644 admin_manual/installation/php_70_installation.rst diff --git a/admin_manual/installation/index.rst b/admin_manual/installation/index.rst index a5d6857febb..ce4a9e19eea 100644 --- a/admin_manual/installation/index.rst +++ b/admin_manual/installation/index.rst @@ -12,8 +12,8 @@ Installation command_line_installation apps_management_installation apps_supported - php_54_installation - php_55_installation + php_56_installation + php_70_installation selinux_configuration nginx_examples nginx_nextcloud_9x diff --git a/admin_manual/installation/php_54_installation.rst b/admin_manual/installation/php_54_installation.rst deleted file mode 100644 index 62bbd3fd656..00000000000 --- a/admin_manual/installation/php_54_installation.rst +++ /dev/null @@ -1,70 +0,0 @@ -========================================= -Installing PHP 5.4 on RHEL 6 and CentOS 6 -========================================= - -Red Hat Enterprise Linux and CentOS 6 still ship with PHP 5.3. Nextcloud -requires PHP 5.4 or better. There are several third-party repositories that -supply PHP 5.4, but you must use the Software Collections (SCL) repository to -be in compliance with your RHEL support contract, and not any other third-party -repository. - -RHEL 6 ------- - -Follow these steps to install PHP 5.4 from SCL. First you must use -your Subscription Manager to enable SCL:: - - subscription-manager repos --enable rhel-server-rhscl-6-eus-rpms - -Then install PHP 5.4 and these modules:: - - yum install php54 php54-php php54-php-gd php54-php-mbstring - -You must also install the updated database module for your database. This -example installs the new PHP 5.4 module for MySQL/MariaDB:: - - yum install php54-php-mysqlnd - -Disable loading the old PHP 5.3 Apache module:: - - mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php53.off - -You should now have a /etc/httpd/conf.d/php54-php.conf file, which loads the -correct PHP 5.4 module for Apache. - -Then restart Apache:: - - service httpd restart - -Verify with :ref:`label-phpinfo` that your Apache server is using PHP 5.4 and loading -the correct modules. - -CentOS 6 --------- - -First install the SCL repo:: - - yum install centos-release-SCL - -Then install PHP 5.4 and these modules:: - - yum install php54 php54-php php54-php-gd php54-php-mbstring - -You must also install the updated database module. This installs the new PHP 5.4 -module for MySQL/MariaDB:: - - yum install php54-php-mysqlnd - -Disable loading the old PHP 5.3 Apache module:: - - mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php53.off - -You should now have a /etc/httpd/conf.d/php54-php.conf file, which loads the -correct PHP 5.4 module for Apache. - -Finally, restart Apache:: - - service httpd restart - -Verify with :ref:`label-phpinfo` that your Apache server is using PHP 5.4 and loading -the correct modules. diff --git a/admin_manual/installation/php_55_installation.rst b/admin_manual/installation/php_55_installation.rst deleted file mode 100644 index 354e72745d9..00000000000 --- a/admin_manual/installation/php_55_installation.rst +++ /dev/null @@ -1,86 +0,0 @@ -========================================= -Installing PHP 5.5 on RHEL 7 and CentOS 7 -========================================= - -PHP 5.4 has been end-of-life since September 2015 and is no longer supported by the PHP team. RHEL 7 still ships with PHP 5.4, and Red Hat supports it. Nextcloud also supports PHP 5.4, so upgrading is not required. However, it is highly recommended to upgrade to PHP 5.5+ for best security and performance. - -**Before upgrading, evaluate all of your PHP apps for compatibility with PHP 5.5.** - -RHEL 7 Upgrade to PHP 5.5 -------------------------- - -To upgrade to PHP 5.5, you must use the Software Collections (SCL) repository to be in compliance with your RHEL support contract, and not any other third-party repository. Follow these steps to install PHP 5.5 from SCL. First you must use your Subscription Manager to enable SCL:: - - subscription-manager repos --enable rhel-server-rhscl-7-eus-rpms - -Then install PHP 5.5 and these modules:: - - yum install php55 php55-php php55-php-gd php55-php-mbstring - -You must also install the updated database module for your database. This installs the new PHP 5.5 module for MySQL/MariaDB:: - - yum install php55-php-mysqlnd - -If you are using the Nextcloud LDAP app, you need this module:: - - yum install php55-php-ldap - -Disable loading the old PHP Apache modules by changing their names:: - - mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php54.off - mv /etc/httpd/conf.modules.d/10-php.conf /etc/httpd/conf.modules.d/10-php54.off - -Copy the PHP 5.5 Apache modules into place:: - - cp /opt/rh/httpd24/root/etc/httpd/conf.d/php55-php.conf /etc/httpd/conf.d/ - cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/10-php55-php.conf /etc/httpd/conf.modules.d/ - cp /opt/rh/httpd24/root/etc/httpd/modules/libphp55-php5.so /etc/httpd/modules/ - -Then restart Apache:: - - service httpd restart - -Verify with ``phpinfo`` that your Apache server is using PHP 5.5 and loading the -correct modules; see :ref:`label-phpinfo` to learn how to use phpinfo. - - -CentOS 7 Upgrade to PHP 5.5 ---------------------------- - -To upgrade to PHP 5.5, use the Red Hat Software Collections (SCL) repository. - -**Before upgrading, evaluate all of your PHP apps for compatibility with PHP 5.5.** - -Follow these steps to install PHP 5.5 from SCL. First install the SCL repository:: - - yum install centos-release-scl - -Then install PHP 5.5 and these modules:: - - yum install php55 php55-php php55-php-gd php55-php-mbstring - -You must also install the updated database module for your database. This installs the new PHP 5.5 module for MySQL/MariaDB:: - - yum install php55-php-mysqlnd - -If you are using the Nextcloud LDAP app, you need this module:: - - yum install php55-php-ldap - -Disable loading the old PHP Apache modules by changing their names:: - - mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php54.off - mv /etc/httpd/conf.modules.d/10-php.conf /etc/httpd/conf.modules.d/10-php54.off - -Copy the PHP 5.5 Apache modules into place:: - - cp /opt/rh/httpd24/root/etc/httpd/conf.d/php55-php.conf /etc/httpd/conf.d/ - cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/10-php55-php.conf /etc/httpd/conf.modules.d/ - cp /opt/rh/httpd24/root/etc/httpd/modules/libphp55-php5.so /etc/httpd/modules/ - -Then restart Apache:: - - service httpd restart - -Verify with ``phpinfo`` that your Apache server is using PHP 5.5 and loading the -correct modules; see :ref:`label-phpinfo` to learn how to use ``phpinfo``. diff --git a/admin_manual/installation/php_56_installation.rst b/admin_manual/installation/php_56_installation.rst new file mode 100644 index 00000000000..ba05f2003f0 --- /dev/null +++ b/admin_manual/installation/php_56_installation.rst @@ -0,0 +1,82 @@ +.. _label-php56installation: + +============================================= +Installing PHP 5.6 on RHEL 6/7 and CentOS 6/7 +============================================= + +Red Hat Enterprise Linux and CentOS 6 still ship with PHP 5.3. Nextcloud +requires PHP 5.6 or better. There are several third-party repositories that +supply PHP 5.6, but you must use the Software Collections (SCL) repository to +be in compliance with your RHEL support contract, and not any other third-party +repository. + +RHEL 6 +------ + +Follow these steps to install PHP 5.6 from SCL. First you must use +your Subscription Manager to enable SCL in RHEL 6:: + + subscription-manager repos --enable rhel-server-rhscl-6-eus-rpms + +For RHEL 7:: + + subscription-manager repos --enable rhel-server-rhscl-7-eus-rpms + +Then install PHP 5.6 and these modules:: + + yum install rh-php56 rh-php56-php rh-php56-php-gd rh-php56-php-mbstring + +You must also install the updated database module for your database. This +example installs the new PHP 5.6 module for MySQL/MariaDB:: + + yum install rh-php56-php-mysqlnd + +Disable loading the old PHP 5.3 Apache module:: + + mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php53.off + +Copy the PHP 5.6 Apache modules into place:: + + cp /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php56-php.conf /etc/httpd/conf.d/ + cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/10-rh-php56-php.conf /etc/httpd/conf.modules.d/ + cp /opt/rh/httpd24/root/etc/httpd/modules/librh-php56-php5.so /etc/httpd/modules/ + +Then restart Apache:: + + service httpd restart + +Verify with :ref:`label-phpinfo` that your Apache server is using PHP 5.6 and loading +the correct modules. + +CentOS 6/7 +---------- + +First install the SCL repo:: + + yum install centos-release-scl + +Then install PHP 5.6 and these modules:: + + yum install rh-php56 rh-php56-php rh-php56-php-gd rh-php56-php-mbstring + +You must also install the updated database module. This installs the new PHP 5.6 +module for MySQL/MariaDB:: + + yum install rh-php56-php-mysqlnd + +Disable loading the old PHP 5.3 Apache module:: + + mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php53.off + +Copy the PHP 5.6 Apache modules into place:: + + cp /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php56-php.conf /etc/httpd/conf.d/ + cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/10-rh-php56-php.conf /etc/httpd/conf.modules.d/ + cp /opt/rh/httpd24/root/etc/httpd/modules/librh-php56-php5.so /etc/httpd/modules/ + +Finally, restart Apache:: + + service httpd restart + +Verify with :ref:`label-phpinfo` that your Apache server is using PHP 5.6 and loading +the correct modules. diff --git a/admin_manual/installation/php_70_installation.rst b/admin_manual/installation/php_70_installation.rst new file mode 100644 index 00000000000..515a3029e98 --- /dev/null +++ b/admin_manual/installation/php_70_installation.rst @@ -0,0 +1,86 @@ +========================================= +Installing PHP 7.0 on RHEL 7 and CentOS 7 +========================================= + +PHP 5.4 has been end-of-life since September 2015 and is no longer supported by the PHP team. RHEL 7 still ships with PHP 5.4, and Red Hat supports it. Nextcloud 11+ requires PHP 5.6 or better, so upgrading to 5.6 is required. For more information see :ref:`label-php56installation`. However, it is highly recommended to upgrade to PHP 7.0+ for best security and performance. + +**Before upgrading, evaluate all of your PHP apps for compatibility with PHP 7.0.** + +RHEL 7 Upgrade to PHP 7.0 +------------------------- + +To upgrade to PHP 7.0, you must use the Software Collections (SCL) repository to be in compliance with your RHEL support contract, and not any other third-party repository. Follow these steps to install PHP 7.0 from SCL. First you must use your Subscription Manager to enable SCL:: + + subscription-manager repos --enable rhel-server-rhscl-7-eus-rpms + +Then install PHP 7.0 and these modules:: + + yum install rh-php70 rh-php70-php rh-php70-php-gd rh-php70-php-mbstring + +You must also install the updated database module for your database. This installs the new PHP 7.0 module for MySQL/MariaDB:: + + yum install rh-php70-php-mysqlnd + +If you are using the Nextcloud LDAP app, you need this module:: + + yum install rh-php70-php-ldap + +Disable loading the old PHP Apache modules by changing their names:: + + mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php54.off + mv /etc/httpd/conf.modules.d/10-php.conf /etc/httpd/conf.modules.d/10-php54.off + +Copy the PHP 7.0 Apache modules into place:: + + cp /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php70-php.conf /etc/httpd/conf.d/ + cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/15-rh-php70-php.conf /etc/httpd/conf.modules.d/ + cp /opt/rh/httpd24/root/etc/httpd/modules/librh-php70-php7.so /etc/httpd/modules/ + +Then restart Apache:: + + service httpd restart + +Verify with ``phpinfo`` that your Apache server is using PHP 7.0 and loading the +correct modules; see :ref:`label-phpinfo` to learn how to use phpinfo. + + +CentOS 7 Upgrade to PHP 7.0 +--------------------------- + +To upgrade to PHP 7.0, use the Red Hat Software Collections (SCL) repository. + +**Before upgrading, evaluate all of your PHP apps for compatibility with PHP 7.0.** + +Follow these steps to install PHP 7.0 from SCL. First install the SCL repository:: + + yum install centos-release-scl + +Then install PHP 7.0 and these modules:: + + yum install rh-php70 rh-php70-php rh-php70-php-gd rh-php70-php-mbstring + +You must also install the updated database module for your database. This installs the new PHP 7.0 module for MySQL/MariaDB:: + + yum install rh-php70-php-mysqlnd + +If you are using the Nextcloud LDAP app, you need this module:: + + yum install rh-php70-php-ldap + +Disable loading the old PHP Apache modules by changing their names:: + + mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php54.off + mv /etc/httpd/conf.modules.d/10-php.conf /etc/httpd/conf.modules.d/10-php54.off + +Copy the PHP 7.0 Apache modules into place:: + + cp /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php70-php.conf /etc/httpd/conf.d/ + cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/15-rh-php70-php.conf /etc/httpd/conf.modules.d/ + cp /opt/rh/httpd24/root/etc/httpd/modules/librh-php70-php7.so /etc/httpd/modules/ + +Then restart Apache:: + + service httpd restart + +Verify with ``phpinfo`` that your Apache server is using PHP 7.0 and loading the +correct modules; see :ref:`label-phpinfo` to learn how to use ``phpinfo``. From ad5581042b9025c305e643c6366aa17430b7c7c3 Mon Sep 17 00:00:00 2001 From: michag86 Date: Thu, 16 Mar 2017 07:31:20 +0100 Subject: [PATCH 2/2] added ldap module for 5.6 --- admin_manual/installation/php_56_installation.rst | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/admin_manual/installation/php_56_installation.rst b/admin_manual/installation/php_56_installation.rst index ba05f2003f0..769f511bbac 100644 --- a/admin_manual/installation/php_56_installation.rst +++ b/admin_manual/installation/php_56_installation.rst @@ -27,10 +27,14 @@ Then install PHP 5.6 and these modules:: yum install rh-php56 rh-php56-php rh-php56-php-gd rh-php56-php-mbstring You must also install the updated database module for your database. This -example installs the new PHP 5.6 module for MySQL/MariaDB:: +installs the new PHP 5.6 module for MySQL/MariaDB:: yum install rh-php56-php-mysqlnd +If you are using the Nextcloud LDAP app, you need this module:: + + yum install rh-php56-php-ldap + Disable loading the old PHP 5.3 Apache module:: mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php53.off @@ -59,11 +63,15 @@ Then install PHP 5.6 and these modules:: yum install rh-php56 rh-php56-php rh-php56-php-gd rh-php56-php-mbstring -You must also install the updated database module. This installs the new PHP 5.6 -module for MySQL/MariaDB:: +You must also install the updated database module for your database. This +installs the new PHP 5.6 module for MySQL/MariaDB:: yum install rh-php56-php-mysqlnd +If you are using the Nextcloud LDAP app, you need this module:: + + yum install rh-php56-php-ldap + Disable loading the old PHP 5.3 Apache module:: mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php53.off