Install ImageMagick and php extensions in centos 6.5

Source: Internet
Author: User
Tags imagemagick centos

Installation: ImageMagick

The code is as follows: Copy code

Wget http://www.imagemagick.org/download/ImageMagick-7.0.1-5.tar.gz
 
Tar-xzvf ImageMagick-7.0.1-5.tar.gz
./Configure -- prefix =/usr/local/imagemagick
Make
Make install

Install the php extension of ImageMagick:

The code is as follows: Copy code

Yum install ImageMagick-devel-y
Ln-s-f/usr/local/imagemagick/include/ImageMagick-7/usr/local/imagemagick/include/ImageMagick
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/include/ImageMagick
Make
Make install

Php. ini configuration

The code is as follows: Copy code


Extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626 /"
Extension = imagick. so

Attached Discuz configuration path:/usr/local/ImageMagick/bin

If you want to use ImageMagick to process image watermarks/zooming in the Discuz program, allow the exec function to run in the php. Ini file. Otherwise, it will not work.

Find disable_functions and remove the exec field.
Friendly reminder: allowing the php exec function to run may cause security problems. Please choose this function as needed.

The configuration encountered a strange problem./usr/local/ImageMagick/bin cannot be entered in php5.5... Go directly to pre_common_setting to search
Fill in imageimpath, and update the cache in the discuz background, which is perfect .... Bmp can also be compressed.

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.