How to install ImageMagic 6.9 on Plesk Centos 7 PHP 7.4 & PHP 8.0
Here are final instructions on how to install ImageMagic on Centos 7 using PHP 7.4 on Plesk.
After literally trying to get it to work for now a week. I was able to put different instructions into a working solution.
I have 2 servers with Centos & Plesk, one with PHP 7.4 & one with PHP 8.0
First remove all traces of ImageMagic on your server. Here is a command that will show you
all instance of ImageMagic installed
Lets run this command:
Step #1
Step #2
It will list per line all versions and types of ImageMagic installed, IF THE Step #1 didnt remove all instances of ImageMagick.
Remove each line of instances that showed above. This is example step of how to remove those lines or if any showed from running above command. Say my result gave me one line only and it gave me this : ImageMagick-6.9.10.68-3.el7.x86_64
Step #3
REPEAT STEP 3 till the list from STEP#2 is removed and uninstalled
Step #4
Step #5
Step #6
Step #7
Step #8
Now are are going to install couple commands to make sure its enabled on php side. This is 100% must otherwise it wont show. This is where I was stuck for a bit. Till found some reading on it. so please run for PHP 7.4 & PHP 8.0
NOTE****If you use both instances PHP 7.4 & PHP 8.0 then both commands can be run below.
PHP 7.4
Step #9
PHP 8.0
Step #9
Reboot Server - ***Full Reboot***
Step #10
You should be all set if you run phpinfo. Your results should be as mine. Screenshot attached. I tried this on several servers and the results worked 100%
Hope this helps someone.
Billy Gladky
Here are final instructions on how to install ImageMagic on Centos 7 using PHP 7.4 on Plesk.
After literally trying to get it to work for now a week. I was able to put different instructions into a working solution.
I have 2 servers with Centos & Plesk, one with PHP 7.4 & one with PHP 8.0
First remove all traces of ImageMagic on your server. Here is a command that will show you
all instance of ImageMagic installed
Lets run this command:
Step #1
yum remove ImageMagick
Step #2
rpm -qa | grep -i ImageMagick
It will list per line all versions and types of ImageMagic installed, IF THE Step #1 didnt remove all instances of ImageMagick.
Remove each line of instances that showed above. This is example step of how to remove those lines or if any showed from running above command. Say my result gave me one line only and it gave me this : ImageMagick-6.9.10.68-3.el7.x86_64
Step #3
sudo yum remove ImageMagick-6.9.10.68-3.el7.x86_64
REPEAT STEP 3 till the list from STEP#2 is removed and uninstalled
Step #4
yum -y install bzip2-devel libtiff-devel giflib-devel ghostscript-devel libwmf-devel jasper-devel libtool-ltdl-devel libXext-devel libXt-devel librsvg2-devel OpenEXR-devel libwebp-devel lcms2-devel
Step #5
Step #6
sed -i '/BuildRequires:\tghostscript-devel/a BuildRequires:\tlibwebp-devel' /root/rpmbuild/SPECS/ImageMagick.spec
Step #7
sed -i '/Requires: pkgconfig/a Requires: libwebp' /root/rpmbuild/SPECS/ImageMagick.spec
Step #8
rpmbuild -ba /root/rpmbuild/SPECS/ImageMagick.spec
Now are are going to install couple commands to make sure its enabled on php side. This is 100% must otherwise it wont show. This is where I was stuck for a bit. Till found some reading on it. so please run for PHP 7.4 & PHP 8.0
NOTE****If you use both instances PHP 7.4 & PHP 8.0 then both commands can be run below.
PHP 7.4
Step #9
rpm -Uvh --force /root/rpmbuild/RPMS/x86_64/ImageMagick-6.9.10.68-3.el7.x86_64.rpm
sudo yum install plesk-php74-imagick
PHP 8.0
Step #9
sudo yum install plesk-php80-imagick
Reboot Server - ***Full Reboot***
Step #10
reboot
You should be all set if you run phpinfo. Your results should be as mine. Screenshot attached. I tried this on several servers and the results worked 100%
Hope this helps someone.
Billy Gladky
Attachments
Last edited by a moderator: