This is the procedure of package installations used to attain the ImageMagick library in PHP.

#!/bin/bash
yum install php-pear  
yum install ImageMagick  
yum install ImageMagick-devel  
yum install php-devel  
yum install gcc  
yum install make  
pecl install imagick  
echo "extension=imagick.so" >> /etc/php.ini  
/etc/init.d/httpd restart