Upgrading PHP and MariaDB/MySQL in ClearOS 7
Red Hat provides more recent versions of PHP, MariaDB/MySQL and other software via their Software Collections product (official documentation). The Red Hat software collections are rebuilt by the CentOS project and available to ClearOS via the CentOS SCL Build project.
This document provides a quick introduction to Software Collections for ClearOS. Other than a few semantic changes with installation and software repositories, the process is very similar to what is in the official documentation.
This type of installation is provided as-is and this document assumes you are already familiar with ClearOS.
There are a number of more up-to-date versions of packages available via Software Collections. At the time of this writing, this includes:
You can find a full list of available packages below:
First, please make sure your ClearOS 7 installation is up-to-date:
Next, you can install packages from one of two sources:
|centos-sclo-rh||Red Hat SCL||Package builds based off of Red Hat's Software Collections
|centos-sclo-sclo||CentOS SCL||Package builds based off of CentOS Community Software Collections
In our example, we will install the PHP 5.6 package based on source code from Red Hat. We'll also need the Apache web server used in the Software Collections ecosystem - httpd24. In this example, the install command is:
yum --enablerepo=centos-sclo-rh install rh-php56 rh-php56-php httpd24 httpd24-mod_ssl
At this point, the software collection is installed, but it is not yet active. You will need to disable the old web server (if active) and install the new Apache HTTP and PHP engines:
systemctl disable httpd ; systemctl stop httpd
systemctl enable httpd24-httpd ; systemctl start httpd24-httpd
At this point, your web server is up and running with the web server document root set to /opt/rh/httpd24/root/var/www/html