One of the major improvements for the latest EA4 is the support for multiple PHP versions. This allows the server to run upto three PHP versions in parallel namely PHP54, PHP55 and PHP56 with the required modules. It also allows you to run and quickly update the domains with different PHP versions with the help of MultiPHP Manager tool provided in the WHM interface.
These are also enhanced with auto-upgrades to ensure that your PHP applications are up-to-update and secured.
CPanel 11.52 provides both EA3 and EA4 support. To enable the MultiPHP support, we need to upgrade the EA (EasyApache) software to EA4.
Upgrading EA3 to EA4
Before upgrading to EA4, there are certain things to be taken cared of.
1. You need to make sure that the RPMUP key's value it set to daily in the /etc/cpupdate.conf
root@server1 [~]# grep RPMUP /etc/cpupdate.conf
This is to ensure that your server receive RPM updates automatically.
2. Now navigate to "Update Preferences" tab in WHM (Home >> Server Configuration >> Update Preferences) and ensure that the Operating System Package update settings is set to Automatic. It will be set to automatic by default, if not modify it.
Conversion from EA3 to EA4
You can run the following script to upgrade from EA3 to EA4. But make sure to run this script as root user.
root@server1 [~]# /scripts/migrate_ea3_to_ea4 --run
This action will install a Technology Preview release of EasyApache4 for cPanel & WHM. This means that you understand the following:
• Not all features in cPanel & WHM are operational.
• Not all EasyApache features are included in the Technology Preview.
• Features and functionality in the release may change over time.
• We will quickly address severe or critical issues only.
• Security bounties are not available.
Do you wish to continue? [y/N]y
Once you type 'yes' to continue. The following packages will be installed in the server.
Package Arch Version Repository Size
ea-cpanel-tools x86_64 1.0-3.1 EA4 5.5 k
ea-profiles-cpanel x86_64 1.0-21.1 EA4 6.7 k
yum-plugin-universal-hooks x86_64 0.1-7.7 EA4 7.6 k
It will take a few minutes to complete the installation process. After the installation, the EA4 loads with a custom profile of Apache 2.4 with minimal installations including the basic modules that you need to run a minimal web server. It will have only one PHP version available and that will be PHP 5.5 which is the default PHP version in cPanel 11.52 installations.
EA4 provides six profiles in addition. You can navigate to EasyApache 4 section in the WHM interface (Home »Software »EasyApache 4) to view all available profiles and install the most suitable one for your production server.
You can either provision the required profiles from the WHM interface itself or you can use the command-line tools for installations.
This is how I installed my required EA4 profile from CLI. All the available profiles are present inside the "/etc/cpanel/ea4/profiles/" folder.
root@server1 [/etc/cpanel/ea4/profiles/cpanel]# ll
drwxr-xr-x 2 root root 4096 Jan 12 08:28 ./
drwxr-xr-x 4 root root 4096 Jan 12 08:28 ../
-rw-r--r-- 1 root root 4291 Dec 15 15:28 allphp.json
-rw-r--r-- 1 root root 4255 Dec 15 15:28 allphp-opcache.json
-rw-r--r-- 1 root root 1846 Dec 15 15:28 default.json
-rw-r--r-- 1 root root 1801 Dec 15 15:28 mpm_itk.json
-rw-r--r-- 1 root root 600 Dec 15 15:28 nophp.json
-rw-r--r-- 1 root root 1830 Dec 15 15:28 ruid2.json
I preferred to install the default.json (cPanel Default) profile. This is the standard Apache package with up-to-date PHP and modules. This package can host multiple sites and users. This includes three PHP packages namely PHP54, PHP55, PHP56 with minimum, but required modules.
This is how I did that on CLI!
root@server1 [/etc/cpanel/ea4/profiles/cpanel]# /usr/local/bin/ea_install_profile --install default.json
Package Arch Version Repository
ea-apache24-mod_cgid x86_64 2.4.18-1.1 EA4 35 k
ea-apache24-mod_mpm_worker x86_64 2.4.18-1.1 EA4 38 k
ea-php54 x86_64 1.1-10.7 EA4 4.1 k
ea-php54-php-bcmath x86_64 5.4.45-7.7 EA4 56 k
ea-php54-php-calendar x86_64 5.4.45-7.7 EA4 44 k
ea-php54-php-cli x86_64 5.4.45-7.7 EA4 2.6 M
ea-php54-php-common x86_64 5.4.45-7.7 EA4 360 k
ea-php54-php-curl x86_64 5.4.45-7.7 EA4 57 k
ea-php54-php-ftp x86_64 5.4.45-7.7 EA4 50 k
ea-php54-php-gd x86_64 5.4.45-7.7 EA4 125 k
ea-php54-php-mcrypt x86_64 5.4.45-7.7 EA4 46 k
ea-php54-php-mysqlnd x86_64 5.4.45-7.7 EA4 172 k
ea-php54-php-pdo x86_64 5.4.45-7.7 EA4 97 k
ea-php54-php-posix x86_64 5.4.45-7.7 EA4 42 k
ea-php54-php-sockets x86_64 5.4.45-7.7 EA4 52 k
ea-php54-php-xml x86_64 5.4.45-7.7 EA4 156 k
ea-php54-runtime x86_64 1.1-10.7 EA4 14 k
ea-php55 x86_64 1.1-10.7 EA4 3.6 k
ea-php55-php-xml x86_64 5.5.30-7.7 EA4 158 k
ea-php56 x86_64 1.1-10.7 EA4 3.7 k
ea-php56-php-bcmath x86_64 5.6.16-5.7 EA4 57 k
ea-php56-php-calendar x86_64 5.6.16-5.7 EA4 46 k
ea-php56-php-cli x86_64 5.6.16-5.7 EA4 2.6 M
ea-php56-php-xml x86_64 5.6.16-5.7 EA4 159 k
ea-php56-runtime x86_64 1.1-10.7 EA4 13 k
These many packages will be installed. It will take a while to complete.
Now I can make use MultiPHP support enabled in our server. You can select the MultiPHP Manager tool from WHM (Home »Software »MultiPHP Manager)
to easily configure the default server PHP version and also modify individual domain PHP versions as required.
You can even modify the PHP basic & INI settings for the installed versions using MultiPHP INI Editor tool.
Now you see how easy to install and manage multiple PHP versions on cPanel 11.52 server. I hope this article is informative and useful for you. Thank you referring to this :). I would appreciate your valuable comments and suggestions on this.
You might also like
Category: LINUX HOWTO