码迷,mamicode.com
首页 > Web开发 > 详细

centos 5 php5.6 安装imagemagick和imagick

时间:2016-08-24 01:24:56      阅读:200      评论:0      收藏:0      [点我收藏+]

标签:imagick imagemagick php5 centos5

在百度查了好久,试验了好久,各种人写的各种不靠谱的帖子,通通失败,现在已经舍弃百度了,下面是我google出来的,经过验证后,很快实现了安装这俩扩展,介绍一下环境先,centos5 64bit,php5.6源码安装 ,yum源最好更新一下为阿里的,具体命令如下:


1.更新源:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak


2.下载源:

CentOS 5

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
       CentOS 6

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

3.运行源:

yum clean all

yum makecache

4.Yum安装php-pear:

    yum -y install php-pear

5.Yum安装ImageMagick:

    yum -y install ImageMagick*

    pecl install Imagick

    这一步需要手动指定Imagemagick的安装路径,因为Imagick需要找Imagemegick的库文件,where is Imagemegick就好了,我的是在/usr/local/Imagemagick下,回车,然后Imagick就自动编译安装了

6.检查一下是否安装成功:

    php -i | grep Imagick

    出现这些就说明成功了:

imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel

Imagick compiled with ImageMagick version => ImageMagick 6.9.5-7 Q16 x86_64 2016-08-18 http://www.imagemagick.org

Imagick using ImageMagick library version => ImageMagick 6.9.5-7 Q16 x86_64 2016-08-18 http://www.imagemagick.org


centos 5 php5.6 安装imagemagick和imagick

标签:imagick imagemagick php5 centos5

原文地址:http://jasonhow.blog.51cto.com/937806/1841631

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!