ImageMagick is a software suite to create, edit, compose or convert bitmap images. To use this utility in PHP, you'll need to install ImageMagick Linux package and also build and install a PHP extension.
Prerequisite for installing imagick PHP extension is php-pear and gcc packages, so let's get those packages installed.
# yum install php-pear gcc
Now, that you have php-pear and gcc, you may install ImageMagick packages.
# yum install ImageMagick ImageMagick-devel php-devel
# pecl install imagick