centos7 install PHP imagick extensions

1, the installation ImageMagic

wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar -xzvf ImageMagick.tar.gz 
cd ImageMagick-7.0.10-3/
./configure --prefix=/usr/local/imagemagick
make
make install
/usr/local/imagemagick/bin/convert -version

2, install php extensions: imagick

wget https://pecl.php.net/get/imagick-3.4.4.tgz
tar xf imagick-3.4.4.tgz 
cd imagick-3.4.4
phpize 
./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/imagemagick
make
make install

 

3, modify the configuration file will be written into the extension = imagick.so

vim /usr/local/php/etc/php.ini 

4, restart php-fpm, to test whether the installation is successful

service php-fpm restart
php -m | grep imagick

5, the installation was successful

Published 115 original articles · won praise 101 · views 370 000 +

Guess you like

Origin blog.csdn.net/Alen_xiaoxin/article/details/105331545