Deprecated: This guide is now deprecated. You can now install ImageMagick for PHP 5.6,7.0,7.1,7.2,7.3,7.4 from PHP>Install extensions. Follow this instruction http://docs.cyberpanel.net/doku.php?id=php-extensions .
Update on 25th August
ImageMagick is now available in LiteSpeed official repo and can be installed using
yum install lsphpXX-pecl-imagick
Replace XX with PHP version. You can also use the instructions below but they are not needed anymore.
To install ImageMagick/imagick php extension you need a package called ImageMagic-devel, you can install from yum
yum install ImageMagick-devel -y
You also need php devel package, gcc and make:
yum install lsphp72-devel make gcc
imagick packages are available at https://pecl.php.net/package/imagick
You can download the latest version, current latest version is 3.4.3.
Note: We are installing it for PHP 7.2, process is similar for other php versions.
cd wget https://pecl.php.net/get/imagick-3.4.3.tgz tar zxf imagick-3.4.3.tgz
cd imagick-3.4.3 /usr/local/lsws/lsphp72/bin/phpize ./configure --with-php-config=/usr/local/lsws/lsphp72/bin/php-config make make install
Then open your php.ini file which is located at
/usr/local/lsws/lsphp72/etc/php.ini and append following at the end:
Now restart OpenLiteSpeed:
systemctl restart lsws
It looks like you're new here. If you want to get involved, click one of these buttons!