Use the following procedure to install the Gmagick software and the PHP PECL extension for use with EA-PHP.
1. The EPEL repository is required so you must ensure that it is installed. Issue the following command via SSH or Terminal as the root user:
yum install epel-release -y
2. Install the required software now that the EPEL repo has been installed:
yum install GraphicsMagick GraphicsMagick-devel -y
3. Find the locations to the PECL binaries for each version of EA-PHP you have installed:
find /opt/cpanel/*/root/usr/bin -type f -name pecl
4. Use the PECL binary for the PHP version of your choice to install the PHP PECL extension. The following example is for EA-PHP 7.4:
/opt/cpanel/ea-php74/root/bin/pecl install gmagick-beta
NOTE: When you run the installation command above, it will stop to prompt you for the prefix of the GraphicsMagick installation. It will look like this:
Please provide the prefix of GraphicsMagick installation [autodetect] :
Do not provide a prefix, just hit the ENTER key to let the installer autodetect the correct prefix.
5. Take note of the last part of the output of the installation. You should see something like the following if the installation was successful:
Build process completed successfully
install ok: channel://pecl.php.net/gmagick-2.0.5RC1
Extension gmagick enabled in php.ini