Overview
This document explains how to install or uninstall EasyApache 4 with the /scripts/migrate_ea3_to_ea4 script.
Requirements
Operating systems
EasyApache 4 supports the following operating systems:
- CentOS 6 or 7.
- CloudLinux™ 6 or 7 (cPanel & WHM version 56 or later only).
- Red Hat® Enterprise Linux® 6 or 7.
Note:
EasyApache 4 does not support Amazon Linux.
Apache and PHP
EasyApache 4 only supports Apache version 2.4.
EasyApache 4 supports PHP versions 5.4, 5.5, 5.6, 7.0, and 7.1.
Settings
You must activate the RPMUP setting if you install EasyApache 4 on your system. The system enables this setting by default. To do this, perform one of the following steps:
- Open the
/etc/cpupdate.conffile and set theRPMUPkey’s value todaily. For more information, read our The cPanel Update Configuration File – cpupdate.conf documentation. - In WHM’s Update Preferences interface (Home >> Server Configuration >> Update Preferences), set the Operating System Package Updates setting to Automatic.
How to install EasyApache 4
To install EasyApache 4, perform the following steps on the command line as the root user:
- Run the following command:
/scripts/migrate_ea3_to_ea4--runNotes:
- If your system runs CloudLinux, the
migrate_ea3_to_ea4script downloads and runs CloudLinux’s EasyApache 4 migration script. - As the migration script runs, the
/scripts/migrate_ea3_to_ea4script copies the/usr/local/lib/php.inifile to the/opt/cpanel/ea-php??/root/etc/php.d/php.inifile and to all installedea-phpversions on your server. To prevent complications, the system comments out lines that resemble the following lines:extension=extension_dir=zend_extension-
- The systems does not adjust any other lines.
- If your system runs CloudLinux, the
- The interface displays the changes that will occur. To continue, follow the system’s instructions.
Arguments
The /scripts/migrate_ea3_to_ea4 script accepts the following arguments:
--run | Run the script. Important: You must include the | |
--help | Display the help information. | |
--revert | Revert the system to the previous version and configuration. | |
--skip_convert | Do not convert and install the EasyApache 3 profile. This flag installs the EasyApache 4 cPanel Default Profile unless you use the --install_profile flag. | |
--install_profile | Do not convert the EasyApache 3 profile. Instead, install the specified profile.
| |
--convert_fail | When you convert an EasyApache 3 profile to an EasyApache 4 profile, this flag prevents execution of the script’s error-correction code. Warning: This may cause a failure when you provision your system. However, you may wish to use this flag for tests. | |
| Answer yes to all of the script’s yes-or-no questions. | |
--force | When you add the Warning: This may cause a failure when you provision your system. | |
--reinstall | Yum attempts to install the required EasyApache 4 RPMs and attempts to reinstall any currently-installed EasyApache 4 packages. |
How to uninstall EasyApache 4
Note:
You can only uninstall EasyApache 4 if you migrated your system from EasyApache 3.
To uninstall EasyApache 4, perform the following steps on the command line as the root user:
- To revert to EasyApache 3 from EasyApache 4, run the following command:
/scripts/migrate_ea3_to_ea4--revert --runNotes:
- This command reverts the system to your previous EasyApache 3 installation and configuration.
- This command attempts to move the Apache files to a new location and reverts the server to the previous state. You can upgrade and downgrade as many times as you wish.
Important:
- Each time that you perform a migration from EasyApache 3 to EasyApache 4, the system moves the
/usr/local/apache/directory to the/usr/local/apache.ea3/directory.- If the
/usr/local/apache.ea3directory exists, the system moves the/usr/local/apache/directory to the/usr/local/apache.ea3.1/directory. - If the
/usr/local/apache.ea3.1directory exists when you run a migration, the migration will fail in order to prevent loss of data.
- If the
- The chance of errors dramatically increases if you migrate your system multiple times. If you revert several times, you must manually delete the previous
/usr/local/apache.ea3.1/backup directory to continue. The system automatically preserves the/usr/local/apache/directory.