How to Install ImageMagick (Imagick) Extension on RHEL / Centos 7
In this article, I’m going to show how to install the Imagick PHP extension on RHEL/CentOS 7. Let’s get started:
Table of Contents
Install Support Repositories
The imagick
is available on the REMI repository. So, we need to install this repository:
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
There is another popular repo call EPEL. You can try without EPEL. If some packages don’t find, then install EPEL:
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Install Imagick
We need to install php-pear, php-devel and gcc packages to compile imagick PHP extension:
sudo yum install php-pear php-devel gcc
After installing the prerequisites, run this command to install Imagick:
sudo yum install php-pecl-imagick
Then go to /etc/php.d folder and search for imagick.ini
file. You may find the file like 20-imagick.ini
or 40-imagick.ini
. After finding the file, run this command:
# replace imagick.ini with your own filename.
echo "extension=imagick.so" > /etc/php.d/imagick.ini
Check Imagick
Let’s try to find Imagick in phpinfo()
:

Comment
Preview may take a few seconds to load.
Markdown Basics
Below you will find some common used markdown syntax. For a deeper dive in Markdown check out this Cheat Sheet
Bold & Italic
Italics *asterisks*
Bold **double asterisks**
Code
Inline Code
`backtick`Code Block```
Three back ticks and then enter your code blocks here.
```
Headers
# This is a Heading 1
## This is a Heading 2
### This is a Heading 3
Quotes
> type a greater than sign and start typing your quote.
Links
You can add links by adding text inside of [] and the link inside of (), like so:
Lists
To add a numbered list you can simply start with a number and a ., like so:
1. The first item in my list
For an unordered list, you can add a dash -, like so:
- The start of my list
Images
You can add images by selecting the image icon, which will upload and add an image to the editor, or you can manually add the image by adding an exclamation !, followed by the alt text inside of [], and the image URL inside of (), like so:
Dividers
To add a divider you can add three dashes or three asterisks:
--- or ***

Comments (0)