How To Install ImageMagick and PHP Imagick on CentOS 8

From DevOps Notebook

Install Epel repo in CentOS 8 first and enable PowerTools

# dnf install -y epel-release
# dnf config-manager --set-enabled PowerTools

Install ImageMagick package in CentOS 8

# dnf install -y ImageMagick ImageMagick-devel

Use pecl to install ImageMagick module for php

# dnf install -y php php-devel php-pear make
# pecl install imagick
# echo "extension=imagick.so" > /etc/php.d/20-imagick.ini