I've followed these same steps on Centos 7, EasyApache4, no joy getting ImageMagick to work. I have to provide complete path to pecl since it seems specific to the php version being used:Helped me build the correct API version.
/usr/local/cpanel/3rdparty/php/56/bin/pecl config-set bin_dir /opt/cpanel/ea-php56/root/usr/bin/ /usr/local/cpanel/3rdparty/php/56/bin/pecl config-set php_bin /opt/cpanel/ea-php56/root/usr/bin/php/ usr/local/cpanel/3rdparty/php/56/bin/pecl config-set php_ini /opt/cpanel/ea-php56/root/etc/php.ini pecl install imagick
Build process completed successfully Installing '/opt/cpanel/ea-php56/root/usr/lib64/php/modules/imagick.so' Installing '/opt/cpanel/ea-php56/root/usr/include/php/ext/imagick/php_imagick_shared.h' install ok: channel://pecl.php.net/imagick-3.4.3 configuration option "php_ini" is not set to php.ini location You should add "extension=imagick.so" to php.ini
[23-Jun-2017 11:26:33 UTC] PHP Fatal error: Class 'Imagick' not found in /home/user/blah/file.php on line 87