php的ImageMagick扩展安装

参考文章:

http://php.net/manual/zh/imagick.installation.php

http://www.imagemagick.org/script/install-source.php

1、ImageMagick安装

下载地址:

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

sourceforge.net/projects/imagemagick/files/

Unpack the distribution with this command:

tar xvzf ImageMagick.tar.gz

Next configure and compile ImageMagick:

$ cd ImageMagick-7.0.7
$ ./configure
$ make

If ImageMagick configured and compiled without complaint, you are ready to install it on your system. Administrator privileges are required to install. To install, type

sudo make install

You may need to configure the dynamic linker run-time bindings:

sudo ldconfig /usr/local/lib

Finally, verify the ImageMagick install worked properly, type

/usr/local/bin/convert logo: logo.gif

2、install Imagick.so

下载地址:

pecl.php.net/package/imagick/download

wget http://pecl.php.net/get/imagick-3.4.3.tgz

Unpack the tar file and then enter the commands in quotes in terminal:

1.  "cd imagick-2.2.3" - go where you placed the folder

2.   "phpize" //phpize为php工具  针对lampp /opt/lampp/bin/phpize   如提示Cannot find autoconf,yum isntall autoconf


3.   "./configure --with-php-config=/opt/lampp/bin/php-config"  //针对lampp

4.   "make"

5.    "make install"

Then, for PHP to honor the the extension, add the following line to the
extensions section of your php.ini file:

extension="imagick.so"

restart apache


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值