Centos installation ImageMagick and Imagick for PHP steps

Source: Internet
Author: User
Tags imagemagick pear zts

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

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.