I am trying to install ImageMagick on my dedicated-virtual Centos server for use with PHP.I first ran the following commands successfully:# yum install gcc php-devel php-pear# yum install ImageMagick ImageMagick-develThen, I ran this command:# pecl install imagickAfter I ran it, I got this error:downloading imagick-3.1.2.tgz ... Starting to download  imagick-3.1.2.tgz (94,657 bytes) .....................done: 94,657  bytes 15 source files, building running: phpize Configuring for: PHP  Api Version:         20100412 Zend Module Api No:      20100525 Zend  Extension Api No:   220100525 shtool at  '/var/tmp/imagick/build/shtool' does not exist or is not executable.  Make sure that the file exists and is executable and then rerun this  script.ERROR: `phpize' failedSo, I google'd it and found that I should do this:If you see this error, it most likely means the servers /tmp  directory does not allow executables to run.  Set a different  temporary directory on a filesystem on which you can execute binaries.  For instance: pear config-set temp_dir /root/tmpThen re-run:  pecl upgrade-allRef.https://opdk.info/faqs/error-shown-during-install-shtool-%E2%80%98vartmpimagickbuildshtool%E2%80%99-does-not-exist-or-not-executableSo, I created a new directory in my root and changed the PEAR configvariable like so:# mkdir rw ../tmp2# pear config-set temp_dir ../tmp2But, now, after trying to install again I get this error:# pecl install imagickdownloading imagick-3.1.2.tgz ...Starting to download imagick-3.1.2.tgz (94,657 bytes).....................done: 94,657 bytesERROR: SECURITY ERROR: file config.m4 (installed to ../tmp2/imagick/config.m4) contains parent directory reference ..How can I fix this?  I just want to install ImageMagick.
Can't Install ImageMagick on Centos using Yum
linux;ssh;centos;php;imagemagick