about what is ImageMagick
ImageMagick is a series of software, mainly for image creation, editing and conversion, etc.
Centos installation ImageMagick
1. Run the following command sequentially
The code is as follows |
Copy Code |
Yum Install ImageMagick Yum Install Imagemagick-devel Yum install php-pear [for PECL] |
Install Php-pear to use the phpize in Pecl,?] The??? 霈 f ERROR: ' Phpize ' failed
The code is as follows |
Copy Code |
Yum-y Install Php-devel |
2. Install 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. Install 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 Service httpd restart
6. Use Phpinfo () or run Php-m | grep Imagick to see if the installation was successful
another 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 |
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, installation methods are almost all in Linux, just one and Linux commands, the other uses the CentOS command.