Install ImageMagick (Imagick) on Centos 8
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
At first, we need to install & enable the EPEL repository:
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
Then run this command:
sudo dnf config-manager --set-enabled PowerTools
We need to install php-pear, php-devel and gcc packages to compile imagick PHP extension:
sudo dnf install php-pear php-devel gcc -y
Install Imagick
After installing required packages, let’s install ImageMagick using following command:
sudo dnf install -y ImageMagick ImageMagick-devel
Let’s install imagick PHP support pack:
sudo dnf install php-pecl-imagick -y
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 40-imagick.ini with your own filename.
echo "extension=imagick.so" > /etc/php.d/40-imagick.ini
Restart web server (optional):
sudo systemctl restart httpd
Verify Installation
Run this command to verify imagick installation:
convert --version
# or
php -r 'phpinfo();' | grep imagick
You can check the PHP modules details from 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)