How to install ImageMagick and imagickforphp in Centos

Source: Internet
Author: User
Tags imagemagick zts
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.

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.