if [ -a '/usr/lib64/php/modules/imagick.so' ] then exit 0 fi yum -y install php-magickwand if [ "$?" -ne 0 ] then exit -6 fi cd /tmp mkdir imgmagick1 cd imgmagick1 wget -O ImageMagick-6.4.2-10.tar.gz ftp://ftp.imagemagick.net/pub/ImageMagick/ImageMagick-6.4.2-10.tar.gz if [ "$?" -ne 0 ] then exit -7 fi tar xvzf ImageMagick-6.4.2-10.tar.gz if [ "$?" -ne 0 ] then exit -8 fi cd ImageMagick-6.4.2 ./configure --disable-openmp if [ "$?" -ne 0 ] then exit -9 fi make if [ "$?" -ne 0 ] then exit -10 fi make install if [ "$?" -ne 0 ] then exit -11 fi cd /tmp mkdir imgmagick2 cd imgmagick2 wget -O imagick-2.2.0.tgz http://pecl.php.net/get/imagick-2.2.0.tgz if [ "$?" -ne 0 ] then exit -1 fi tar xvzf imagick-2.2.0.tgz if [ "$?" -ne 0 ] then exit -2 fi cd imagick-2.2.0/
phpize ./configure if [ "$?" -ne 0 ] then exit -3 fi make if [ "$?" -ne 0 ] then exit -4 fi make install if [ "$?" -ne 0 ] then exit -5 fi echo "extension=imagick.so" > /etc/php.d/imgmagick.ini