Question
How to update ImageMagick to version 7 in CentOS 7.9 in PHP 8.2?
Answer
Warning: This scenario was not tested with Plesk, thus not supported. To run it, you will have to remove the ImageMagick 6, that allows ImageMagick to run in php7 and php8 in 6.9. All the actions should be performed at own risk.
-
Connect to the Plesk server via SSH.
- Remove the current version of ImageMagick:
# yum remove ImageMagick ImageMagick-devel
- Download remi repository:
# yum install epel-release yum-utils -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
- Enable it:
# yum-config-manager --enable remi
- Install ImageMagick from remi repository:
# yum install ImageMagick7 ImageMagick7-libs ImageMagick7-devel -y
- Install the development tools to compile the module:
# yum groupinstall 'Development Tools'
- Install the develpment package for plesk-php82:
# yum install plesk-php82-devel
- Install imagick extension for Plesk PHP 8.2:
# /opt/plesk/php/8.2/bin/pecl install Imagick
- When the process is finished, rename .so file, so that it is not replaced during updates:
# mv /opt/plesk/php/8.2/lib64/php/modules/imagick.so /opt/plesk/php/8.2/lib64/php/modules/imagick_new.so
- Execute the following command to add the extension:
# echo "extension=imagick_new.so" > /opt/plesk/php/7.2/etc/php.d/imagick.ini
Comments
0 comments
Please sign in to leave a comment.