On CentOS, the following commands can be used to install Imagemagick along with imagick, the PHP extension.

$ sudo yum install ImageMagick
$ sudo yum install ImageMagick-devel
$ sudo pecl install imagick
$ echo "extension=imagick.so" > /etc/php.d/imagick.ini
$ service httpd restart

Afterwards, you can check to verify that imagick has been added as a PHP module using the following command.

php -m | grep imagick