Compile Apache and PHP with cPanel
Compiling Apache and PHP with cPanel is simple. You have 2 different options to compile Apache and PHP on your server. You can run the compile via SSH (recommended) or you can run it through WHM (Web Host Manager). The reason the recommended way is to run the compile via SSH is because it can time out when it's ran through WHM. This article will provide instructions on how to process the compile via SSH and through WHM.
If you're looking to recompile Apache/PHP on a live server, Acenet suggests doing so during your server's non-peak hours because the recompile can cause performance degradation while it's processing (which usually takes about an hour to complete).
Compile Apache & PHP via SSH (recommended)
[1] Log into your server via SSH as root.
Before proceeding with the rest of the install instructions, you may want to consider using screen to compile Apache/PHP just in case you lose SSH connectivity during the recompile. You can view more details on how to install and use screen here:
[2] Run the following command:
/scripts/easyapache
If you have a virtual server with Acenet, you may need to run this command instead:
/scripts/easyapache --skip-xen-broken-xm-check
[3] Ensure 'Previously Saved Config (** DEFAULT **)' is selected.
[4] Hit the Tab key until '[Start customizing based on profile]' is highlighted and then hit Enter.
[5] Use the up and down arrow keys to highlight the version of Apache you want to install and then hit the space bar to select it.
Note: Acenet suggests installing the latest version of Apache that's available for security reasons.
[6] Hit the tab key until '[Next Step]' is highlighted and then hit Enter.
[7] Use the up and down arrow keys to highlight the version of PHP you want to install and then hit the space bar to select it.
Note: Acenet suggests installing the latest version of PHP that's available for security reasons. You may need an older version of PHP for some of your scripts to function properly though.
[8] Hit the tab key until '[Next Step]' is highlighted and then hit Enter.
[9] Hit the tab key until '[Exhaustive Options List]' is highlighted and the hit Enter.
[10] Using the up and down arrow keys, highlight each Apache and PHP modules you need installed and hit the space bar to select them. Acenet suggests leaving any of the modules selected that are selected by default.
If you forget any modules you need installed, you can always recompile Apache/PHP later on.
Here are some of the most common requests Acenet receives for Apache/PHP modules:
- IonCube Loader
- Mod Security
- Zend Guard Loader
- CurlSSL
- Exif
- FTP
- GD
- Mbstring
- Mcrypt
- MySQL "Improved" extension
- Openssl
- PDO
- PDO MySQL
- SOAP
- TTF (FreeType)
- XSL
- XmlRPC
- Zip
[11] Hit the tab key until '[Next Step]' is highlighted and then hit Enter.
[12] Hit the tab key until '[Save and build]' is highlighted and then hit Enter.
[13] Ensure '[Yes]' is highlighted and then hit Enter.
[14] Ensure '[I Understand]' is highlighted and then hit Enter.
[15] Wait for the recompile to complete (usually takes about an hour).
Compile Apache & PHP through WHM
[1] Log into your server via SSH as root.
[2] Click on 'EasyApache (Apache Update)' under the 'Software' section.
[3] Ensure 'Previously Saved Config (** DEFAULT **)' is selected.
[5] Select the version of Apache you want to install.
Note: Acenet suggests installing the latest version of Apache that's available for security reasons.
[7] Select the version of PHP you want to install.
Note: Acenet suggests installing the latest version of PHP that's available for security reasons. You may need an older version of PHP for some of your scripts to function properly though.
[10] Check mark each Apache and PHP module you need installed. Acenet suggests leaving any of the modules selected that are selected by default.
If you forget any modules you need installed, you can always recompile Apache/PHP later on.
Here are some of the most common requests Acenet receives for Apache/PHP modules:
- IonCube Loader
- Mod Security
- Zend Guard Loader
- CurlSSL
- Exif
- FTP
- GD
- Mbstring
- Mcrypt
- MySQL "Improved" extension
- Openssl
- PDO
- PDO MySQL
- SOAP
- TTF (FreeType)
- XSL
- XmlRPC
- Zip
[14] Wait for the recompile to complete. (usually takes about an hour)