git clone https://github.com/mkoppanen/imagick.git imagick
cd imagick/
/apm/server/php/bin/phpize
yum install ImageMagick ImageMagick-devel
./configure --with-php-config=/apm/server/php/bin/php-config
make
cp modules/imagick.so /apm/server/conf/ext/
systemctl restart php-fpm.service