Imagemagick安装及php扩展安装

1.获取下载地址

wget http://www.imagemagick.org/download/ImageMagick.tar.gz

2.解压

tar zxf ImageMagick.tar.gz

3.进入解压目录

cd ImageMagick-7.0.5-5

4.安装jpeg:

yum -y groupinstall 'Development Tools'
yum -y install bzip2-devel freetype-devel libjpeg-devel libpng-devel libtiff-devel giflib-devel zlib-devel ghostscript-devel djvulibre-devel libwmf-devel jasper-devel libtool-ltdl-devel libX11-devel libXext-devel libXt-devel lcms-devel libxml2-devel librsvg2-devel OpenEXR-devel php-devel

5.检查配置

./configure

6.安装ImageMagick

make install

查看是否安装成功

convert -version
Version: ImageMagick 7.0.5-5 Q16 x86_64 2017-05-09 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP 
Delegates (built-in): fontconfig freetype jng jpeg lzma png x xml zlib

7安装扩展

pecl install imagick

8修改php.ini

extension=/usr/local/lib/php/extensions/no-debug-non-zts-20160303/imagick.so

9重启php查看phpinfo()是否包含imagemagick

你可能感兴趣的:(Imagemagick安装及php扩展安装)