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

番茄系统家园 · 2022-05-30 02:43:23

1. 程序准备
ImageMagick 【】
imagick 【】
MagickWand For PHP 【】

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

至此安装结束,安装路径默认为 /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即可!

免责声明: 凡标注转载/编译字样内容并非本站原创,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如果你觉得本文好,欢迎推荐给朋友阅读;本文链接: https://m.nndssk.com/xtwt/1975001fmEPf.html
猜你喜欢
最新应用
热门应用