Now have a lot of friends in the use of installing ImageMagick Imagick for PHP, today I also want to do but do not know how to operate, I will introduce you to the CentOS installation ImageMagick Imagick for PHP steps, you can refer to the students.
about what is ImageMagick
ImageMagick is a set of software series, mainly used for image creation, editing and conversion, etc.
Centos installation ImageMagick
1. Run the following command in turn
The code is as follows |
Copy Code |
Yum Install ImageMagick Yum Install Imagemagick-devel Yum install php-pear [for PECL] |
is the php-pear installed to use the phpize in pecl? Of??? Joint Co F ERROR: ' Phpize ' failed
The code is as follows |
Copy Code |
Yum-y Install Php-devel |
2. Installing the C compiler
The code is as follows |
Copy Code |
Yum Install GCC |
If you can't install GCC, use this command:
The code is as follows |
Copy Code |
Yum install gcc gcc-c++ autoconf automake |
3. Installing Imagick
The code is as follows |
Copy Code |
PECL Install Imagick |
4. Load Imagick to PHP
In/etc/php.ini plus extension=imagick.so
5. Restart the service httpd restart
6. Use Phpinfo () or run Php-m | grep Imagick to see if the installation was successful
Another installation installation ImageMagick and Imagick for PHP method
1. Download and install ImageMagick
The code is as follows |
Copy Code |
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: Installing this extension does not require installation of ImageMagick
Find the latest version of Imagick from Http://pecl.php.net/package/imagick
The code is as follows |
Copy Code |
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 |
The make install execution results show:
The code is as follows |
Copy Code |
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 the php.ini to take effect
Tips, the installation method is almost all in Linux, but there is one and the Linux command, the other uses the CentOS command.
Centos installation ImageMagick and Imagick for PHP steps