Install Imagick extension for PHP 7.3 on Linux CentOS 7

rodar o comando ./pecl install imagick onde o php está instalado

$ su
# yum install ImageMagick ImageMagick-devel
# cd /opt/cpanel/ea-php73/root/usr/bin
# ./pecl install imagick



OU


Install php imagick extension on CentOS
download souce code

# wget http://pecl.php.net/get/imagick-3.1.2.tgz
# tar xzfv imagick-3.1.2.tgz
# cd imagick-3.1.2

Install ImageMagick-devel first.

# yum install ImageMagick-devel

Build

# phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config
# make
# make install

Copy imagick.so to extension directory.
If you do not know the path, find it out by (or change it in php.ini):

# php -i | grep "extension_dir"

Then, edit php.ini, add extension=imagick.so.
If you run php in a webserver, restart the it, for example:

# cd /etc
# vi php.ini
# sudo service httpd restart