Centos installation ImageMagick and Imagick for PHP steps

Source: Internet
Author: User
Tags install php imagemagick pear zts centos

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.