A detailed explanation of ImageMagick extension installation method in CentOS6

Source: Internet
Author: User
Tags install php imagemagick pack pear

ImageMagick can be installed by using the Remi Installation library, or by compiling the source code from the latest stable version. The following old left on the finishing of the tutorials from abroad, divided into different ways to install.

One of the methods, installation library installation ImageMagick extension

A-If we do not have the Epel library installed, we need to first install

The code is as follows Copy Code
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
RPM-UVH epel-release-6*.rpm
B-Install Remi Library
The code is as follows Copy Code
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
RPM-UVH remi-release-6*.rpm
C-Edit/etc/yum.repos.d/remi.repo file start

We need to find Remi Library and change Enabled=0 to enabled=1.

D-Install the required dependency pack environment
The code is as follows Copy Code
Yum install-y gcc php-devel php-pear
E-Install ImageMagick
The code is as follows Copy Code
Yum install-y ImageMagick Imagemagick-devel

After the installation is complete, we see a hint that the installation was successful.

Method Two, install from source code ImageMagick

A-Installing A dependency Pack Environment

The code is as follows Copy Code
Yum-y groupinstall ' Development Tools '
Yum-y Install bzip2-devel freetype-devel libjpeg-devel libpng-devel libtiff-devel giflib-devel zlib-devel Ghostscript-devel djvulibre-devel libwmf-devel jasper-devel libtool-ltdl-devel libx11-devel libXext-devel libXt-devel Lcms-devel libxml2-devel librsvg2-devel openexr-devel php-devel
B-Get the installation source
The code is as follows Copy Code
wget http://www.imagemagick.org/download/ImageMagick.tar.gz
Tar xvzf ImageMagick.tar.gz
CD imagemagick*
C-Configure and compile source code
The code is as follows Copy Code
./configure
Make
Make install
This takes a little time and we wait.
D-Verify that the installation is successful
The code is as follows Copy Code
Convert--version

E-Install PHP extensions

The code is as follows Copy Code
PECL Install Imagick
If there is a-bash:pecl:command not found hint error, we need to run the Yum install php-devel php-pear Environment package before performing the previous step.
F-php.ini Add extension=imagick.so
After the carriage return is executed, we can see that the prompt needs to add the extension=imagick.so in the php.ini and add it to the/etc/php.ini file.
G-then check to see if the installation is successful
The code is as follows Copy Code
php-m | grep Imagick

We can see already OK. If you are running a Web server, such as Apache, remember to reboot.

The code is as follows Copy Code
Service httpd Restart

PS The above mentioned two kinds of ImageMagick extended installation methods are available, small series have tested OH.

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.