Steps for installing ImageMagick and imagickforphp in Centos, the following describes how to install ImageMagick imagick for php on Centos.
What is ImageMagick?
ImageMagick is a set of software series mainly used for image creation, editing and conversion.
Install ImageMagick on Centos
1. run the following commands in sequence
The code is as follows: |
|
Yum install ImageMagick Yum install ImageMagick-devel Yum install php-pear [for PECL] |
Install php-pear to use phpize in pecl,?] ??? Failed f error: 'phpize' failed
The code is as follows: |
|
Yum-y install php-devel |
2. install the C compiler
The code is as follows: |
|
Yum install gcc |
If gcc cannot be installed, use the following command:
The code is as follows: |
|
Yum install gcc-c ++ autoconf automake |
3. install imagick
The code is as follows: |
|
Pecl install imagick |
4. load imagick to php
Add extension = imagick. so to/etc/php. ini.
5. restart service httpd restart
6. use phpinfo () or run php-m | grep imagick to check whether the installation is successful.
Install ImageMagick and imagick for php
1. download and install ImageMagick
The code is as follows: |
|
Wget ftp://mirror.aarnet.edu.au/pub/imagemagick/ImageMagick-6.6.8-10.tar.gz Tar-xzvf ImageMagick-6.6.8-10.tar.gz ./Configure -- prefix =/usr/local/imagemagick Make Make install |
2. download and install Imagick
Note: You do not need to install ImageMagick to install the extension.
Find the latest version of imagickfrom http://pecl.php.net/package/imagick
The code is as follows: |
|
Wget http://pecl.php.net/get/imagick-3.1.0RC1.tgz Tar-xzvf imagick-3.1.0RC1 Phpize ./Configure -- with-php-config =/usr/local/php/bin/php-config -- with-imagick =/usr/local/imagemagick Make Make install |
Make install:
The code is as follows: |
|
Installing shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/ Installing header files:/usr/local/php/include/php/ Generate imagick. so to/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626 /, |
Then manually configure php. ini to make it take effect.
Tips: The installation methods are almost all in linux, but there is one and linux command, and the other uses the Centos command.