Updating Apache using cPanel EasyApache
EasyApache is a pre-configured script included with cPanel that allows you to easily compile and update the Apache web server, along with PHP and other modules, through WHM or directly via SSH. It handles downloading, patching, compiling, and installing Apache automatically.
Updating Apache via SSH Using EasyApache
Follow these steps to update Apache using EasyApache from the command line:
- SSH into your server as root.
- Run the EasyApache script with the following command:
/scripts/easyapache - The EasyApache menu will appear. Select option 6 to begin the build process with the currently saved profile.
- Review the Apache version and module selections presented. Make any changes you require, such as enabling or disabling specific Apache modules or PHP extensions.
- Confirm your selections and proceed. EasyApache will begin downloading the source code for Apache and PHP.
- The compilation process will start automatically. This typically takes between 15 to 30 minutes depending on your server's CPU speed and the modules selected.
- Once the build completes, EasyApache will automatically install the new Apache binaries and restart the web server.
- Verify the update was successful by checking the Apache version:
httpd -v
Updating via WHM
You can also run EasyApache through the WHM interface by navigating to Software › EasyApache (Apache Update). The WHM interface provides the same options as the command-line version and is suitable for administrators who prefer a graphical interface.
It is recommended to run EasyApache during off-peak hours, as the compilation process temporarily takes the web server offline while the new binaries are being installed.