How to enable new Apache or PHP module in cPanel EasyApache 4
The main disadvantage of EasyApache 3 was that it took almost 20 – 30 minutes just to add a new PHP or Apache module. This is because every change you need to make requires a full recompile of Apache and PHP. This is fixed in EA4 through Yum and RPM’s and now it takes just seconds to install a new module. So, in this article, we will discuss on how to enable new Apache or PHP module in cPanel EasyApache 4.
Enable new Apache or PHP module in cPanel EasyApache 4
As I informed earlier a major change in EasyApache 4 is the move of the EA4 interface into the system package manager. Hence, you can easily install a missing module from “EasyApache 4” interface in WHM or directly from commandline.
Steps to enable new Apache or PHP module in cPanel EasyApache 4 from WHM
- Login to WHM panel of your server and move to Home >> Software >> EasyApache 4.
- Begin customizations by clicking the “Customize” button on the default profile.
- On the new page, you can find the different categories like Apache MPM, Apache Modules, PHP and PHP Extensions on the left side panel. Check the below screenshot for details.
- Select the appropriate category and enable the modules by just clicking the button provided on the right-hand side. Refer the screenshot’s given below for more details.
- Here, the already enabled modules or extensions will be shown as “Unaffetced”. Refer the below image for details.
- Once you have enabled all the required modules, go to “Review” section. It will list all the changes that you are going to make by provisioning the current profile. The following screenshot will give you more idea about this.
- Finally, you can provision the profile by clicking the “provision” button on the bottom of the “Review” page.
- That’s it!!
Steps to enable new Apache or PHP module in cPanel EasyApache 4 from Commandline.
- Login to the server as root.
- Use the “yum install” command to install your desired Apache or PHP module.
Install an Apache module:
Firstly, check whether the package is already installed on the server using rpm command.
[root@server ~]# rpm -qa | grep package_name [root@server ~]#
If it’s not previously installed, you can install the package on the command line with the following command:
yum install package_name
To install Apache mod_remoteip module, just execute the following command.
[root@server ~]# yum install ea-apache24-mod_remoteip
Install a PHP module:
EasyApache 4’s packages for PHP modules and extensions use the ea-php##-php-module naming convention, where ## represents the PHP version number and module represents the name of the PHP module.
Please check whether the module is already installed by using either the rpm command or directly via command “php -m | grep php_module”.
[root@server ~]# yum install ea-php56-php-mbstring
The above example installs the ea-php56-php-mbstring package, where 56 represents the PHP version and mbstring represents the extension name.
That’s it. You are done!!!
Leave a comment for any queries.