帮助中心 >  技术知识库 >  云服务器 >  服务器教程 >  centos系统上为php安装imagick扩展以及magickwand扩展的方法

centos系统上为php安装imagick扩展以及magickwand扩展的方法

2017-12-15 12:01:42 7690

centos系统上为php安装imagick扩展以及magickwand扩展的方法

1. 程序准备

ImageMagick 【http://www.landui.com/script/download.php  】

imagick 【http://www.landui.com/package/imagick  】

MagickWand For PHP 【http://www.landui.com/  】

2. 安装程序

(1) 安装 ImageMagick 【如果已经安装请跳过】,此处以当前的最新版本 ImageMagick-6.7.5-5.tar.gz 为例

tar zxvf ImageMagick-6.7.5-5.tar.gz
cd ImageMagick-6.7.5-5
./configure
make
make install
ldconfig /usr/local/lib</p> <p>

至此安装结束,安装路径默认为 /usr/local下面

(2)配置pkgconfig相关参数【如果处理则跳过】

ln -s /usr/local/lib/pkgconfig/MagickWand.pc /usr/lib/pkgconfig/MagickWand.pc
ln -s /usr/local/lib/pkgconfig/ImageMagick.pc /usr/lib/pkgconfig/ImageMagick.pc

(3)安装 imagick 【此处以最新版本3.1.0 RC1为例】

tarzxvfimagick-3.1.0RC1.tgz
cdimagick-3.1.0RC1
/usr/local/webserver/php/bin/phpize
./configure--enable-shared--enable-static--with-php-config=/usr/local/webserver/php/bin/php-config--with-imagick=/usr/local/
make
makeinstall

(4)安装MagickWandForPHP【此处以最新版本1.0.9为例】

tarzxvfMagickWandForPHP-1.0.9.tar.gz
cdMagickWandForPHP-1.0.9
/usr/local/webserver/php/bin/phpize
./configure--enable-shared--enable-static--with-php-config=/usr/local/webserver/php/bin/php-config--with-magickwand=/usr/local/
make
makeinstall

3.编译完成后,将生成的文件添加到php.ini即可!


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: