欢迎光临
我们一直在努力

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

1. 程序准备
ImageMagick 【http://www.imagemagick.org/script/download.php】
imagick 【http://pecl.php.net/package/imagick】
MagickWand For PHP 【http://www.magickwand.org/】

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即可!

赞(0) 打赏
未经允许不得转载:欧欧colo教程网 » centos系统上为php安装imagick扩展以及magickwand扩展的方法

更稳定的 国内物理服务器租用 机柜托管

促销 - 国内物理机 40核 64G内存 1T硬盘 ¥260

服务器促销国内物理机 40核 64G内存 1T硬盘 ¥260

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏