How to recompile Apache/PHP in WHM
How to recompile Apache/PHP.
There are two ways available to recompile apache/php in your cpanel server. Use it if you know properly.
log into WHM and navigate to EasyApache (Apache Update)
On the main page make sure ‘Begin by selecting a profile to load:’ is selected and then click ‘Start customizing based on profile‘.
On the second page (Apache Version), we recommend upgrading to the latest available if not already selected. Then click ‘Next Step‘.
On the third page (PHP Major Version) select the version of php you want, click ‘Next step‘ if you are unsure.
On the forth page (PHP Minor version) select the version of php you want, click ‘Next step’ if you are unsure.
On the fifth page (Short options list)
select ‘Mod suPHP’ and select carefully which modules you want.
Click bottom of the page select ‘Save and Build‘.
Recompile apache and php via command line
For security reason, try to run easy apache script through screen
If you have not installed screen then use yum to install screen
root@serv [~]#yum install screen
Once screen installation completed.
and do above same method to recompile apache. After click Save and Build, use blow command to jumb from screen.
this will run background on your screen.
Use this below command to resume screen.
screen -r <screen id >