How to install imagick extension and magickwand extension for php in centos

Source: Internet
Author: User
Tags imagemagick
This article describes how to install the imagick extension and magickwand extension for php in centos. for details, refer to CentOS.

1. program preparation
ImageMagick [http://www.imagemagick.org/script/download.php]
Imagick [http://pecl.php.net/package/imagick]
MagickWand For PHP [http://www.magickwand.org /]

2. installer

1) install ImageMagick [skip if installed], here with the latest version of the ImageMagick-6.7.5-5.tar.gz as an example


Copy codeThe code is as follows:
Tar zxvf ImageMagick-6.7.5-5.tar.gz
Cd ImageMagick-6.7.5-5
./Configure
Make
Make install
Ldconfig/usr/local/lib

The installation has ended. the installation path is/usr/local by default.

2) configure pkgconfig parameters [skip if processing is done]


Copy codeThe code is as follows:
Ln-s/usr/local/lib/pkgconfig/MagickWand. pc/usr/lib/pkgconfig/MagickWand. pc
Ln-s/usr/local/lib/pkgconfig/ImageMagick. pc/usr/lib/pkgconfig/ImageMagick. pc

3) install imagick. [the latest version 3.1.0 RC1 is used as an example]


Copy codeThe code is as follows:
Tarzxvfimagick-3.1.0RC1.tgz
Cdimagick-3.1.0RC1
/Usr/local/webserver/php/bin/phpize
. /Configure -- enable-shared -- enable-static -- with-php-config =/usr/local/webserver/php/bin/php-config -- with-imagick =/usr/local/
Make
Makeinstall

4) install MagickWandForPHP. [take the latest version 1.0.9 as an example]


Copy codeThe code is as follows:
TarzxvfMagickWandForPHP-1.0.9.tar.gz
CdMagickWandForPHP-1.0.9
/Usr/local/webserver/php/bin/phpize
. /Configure -- enable-shared -- enable-static -- with-php-config =/usr/local/webserver/php/bin/php-config -- with-magickwand =/usr/local/
Make
Makeinstall

3. after compilation, add the generated file to php. ini!

Related Article

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.