• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

Install ImageMagick on CentOS 6

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
38
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Simple install from remi repository
  2. Install from source code
  3. Install PHP extension
  4. References
  5. Want to contribute?


ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PNG, Postscript, SVG, and TIFF. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

ImageMagick can be installed by either using the remi repository, or by compiling the source code from the latest stable release. Following the installation guide is another guide on how to install the ImageMagick PHP extension (imagick).

Simple install from remi repository

If you have not installed the epel repository, install it now.

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6*.rpm

Next, install the remi repository:

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm

An additional step is required to enable the remi repository:

Use your favorite text editor to open /etc/yum.repos.d/remi.repo. Look for the remi section and find enabled=0 and change it to enabled=1.

Make sure that the required dependencies are installed:

yum install -y gcc php-devel php-pear

Then install ImageMagick:

yum install -y ImageMagick ImageMagick-devel

Extra: If you plan on using ImageMagick in perl scripts:

yum install ImageMagick-perl

The installation is now complete.

Install from source code

First install dependencies:

 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

Now, fetch the source code:

wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick*

Configure and compile the source code. Depending on your server specs, this may take some time to complete.

./configure
make
make install

Verify that the compile and install were successful:

convert --version 

Install PHP extension

Install the imagick PHP extension module imagick.so:

pecl install imagick

You will be asked to provide the ImageMagick installation prefix. Press [ENTER] to auto detect. You may get this error following the pecl command:

"Error shtool at '/var/tmp/imagick/build/shtool' does not exist or is not executable. Make sure that the file exists and is executable and then rerun this script"

This is due to a secured and mounted /tmp directory. You may have setup your /tmp folder in this way as part of your server security lock-down. To resolve this error temporarily, remove the /tmp line in /etc/fstab and reboot. Run the pecl command again. When installation completes, you can add the /tmp line back to /etc/fstab and reboot. Using the umount command will not work if /tmp has the nosuid,noexec,nodev options.

Next, add the imagick.so extension to the php.ini file. Start by locating your php.ini file. It is usually found in /etc.

php -i | grep "Loaded Configuration File"

Use a text editor to open php.ini and look for the dynamic extension section. Add extension=imagick.so, then save.

Check the php extension list to verify that imagick has installed correctly:

php -m | grep imagick

If you are running a webserver, such as Apache, remember to restart it:

service httpd restart

References

  1. The official ImageMagick website.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Install Crate.IO on CentOS 7

Next Post

How to Install OpenLiteSpeed and PHP 7 on CentOS 7

Next Post

How to Install OpenLiteSpeed and PHP 7 on CentOS 7

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet