In Baidu for a long time, test a long time, a variety of people write a variety of unreliable posts, all failed, now has abandoned Baidu, the following is my Google out, after verification, quickly realized the installation of these two extensions, introduction of the environment first, centos5 64bit,php5.6 source installation, Yum source best update for Ali's, the specific command is as follows:
1. Update the Source:
Mv/etc/yum.repos.d/centos-base.repo/etc/yum.repos.d/centos-base.repo.bak
2. Download the Source:
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. Running Source:
Yum Clean All
Yum Makecache
4.Yum installation Php-pear:
Yum-y Install Php-pear
5.Yum installation ImageMagick:
Yum-y Install imagemagick*
PECL Install Imagick
This step requires you to manually specify the installation path for the ImageMagick, because Imagick needs to find the Imagemegick library file, where is Imagemegick good, my is under/usr/local/imagemagick, enter, Then the Imagick is automatically compiled and installed.
6. Check if the installation was successful:
Php-i | grep Imagick
The appearance of these shows success:
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 installs ImageMagick and Imagick