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
|
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
|
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
|
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.