php安装imagick扩展
参考链接:http://my.oschina.net/u/142836/blog/169382
需要下载的东西:
libwebp-0.5.1.tar.gzwgetImageMagick6.9.5.tar.gzwgethttp://git.p_w_picpathmagick.org/repos/ImageMagick/repository/archive.tar.gz?ref=6.9.5-0imagick-3.1.2.tgzhttps://pecl.php.net/get/imagick-3.1.2.tgz
一定要用ImageMagick6.9.5.tar.gz这个包,因为官方最新版的是ImageMagick-7.0.2-4,安装后有问题.
一.
yum-yinstalllibpng-devellibjpeg-devel
二.安装webo库
[root@testserver-1src]#tar-zxvflibwebp-0.5.0.tar.gz[root@testserver-1src]#cdlibwebp-0.5.0/[root@testserver-1libwebp-0.5.0]#./configure&&make&&makeinstall[root@testserver-1libwebp-0.5.0]#cp/usr/local/lib/libwebp.so.6.0.0/usr/lib64/[root@testserver-1libwebp-0.5.0]#ln-s/usr/lib64/libwebp.so.6.0.0/usr/lib64/libwebp.so.6[root@testserver-1libwebp-0.5.0]#ln-s/usr/lib64/libwebp.so.6.0.0/usr/lib64/libwebp.so
安装ImageMagick
[root@testserver-1src]#tar-zxvfImageMagick6.9.5.tar.gz[root@testserver-1src]#cdImageMagick-6.9.5/[root@testserver-1ImageMagick-6.9.5]#./configure--prefix=/usr/local/p_w_picpathmagick--with-webp[root@testserver-1ImageMagick-6.9.5]#make&&makeinstall[root@testserver-1src]#ln-s/usr/local/p_w_picpathmagick/include/ImageMagick-6/usr/local/p_w_picpathmagick/include/ImageMagick
不同的地方:
[root@testserver-1src]#vim/etc/profileexportMAGICK_HOME=/usr/local/p_w_picpathmagick/exportPATH=$MAGICK_HOME/bin:$PATH[root@testserver-1src]#source/etc/profile
没有上面那一步,可能会找不到convert命令。
安装php扩展
tar-zxvfimagick-3.1.0RC2.tgzcdimagick-3.1.0RC2/usr/local/php/bin/phpizeexportPKG_CONFIG_PATH=/usr/local/p_w_picpathmagick/lib/pkgconfig./configure--with-php-config=/usr/local/php/bin/php-config--with-imagick=/usr/local/p_w_picpathmagickmake&&makeinstall
有两个坑,就是用官方的最新版本ImageMagick,不正常.
另外一个是,要source 环境
可以参考:http://www.p_w_picpathmagick.org/script/binary-releases.php/
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。