Installing ImageMagick for PHP on CentOS 7

ImageMagick is a set of programs (console utilities) for reading and editing files of many graphic formats. It is free and cross-platform software.

Install the required packages for ImageMagick

[[email protected]]# yum install gcc php-devel php-pear

Launching the ImageMagick installation

[[email protected]]# yum install ImageMagick ImageMagick-devel

Install php-module for ImageMagick functioning in php scripts, and activate it

[[email protected]]# pecl install imagick
[[email protected]]# echo "extension=imagick.so" > /etc/php.d/imagick.ini

Now it remains to restart either the apache web server or php-fpm if you are using the nginx + php-fpm bundle

[[email protected]]# systemctl restart apache
[[email protected]]# systemctl restart php-fpm
Sidebar