Author Topic: Installing ImageMagic at Multiple PHP Version  (Read 1066 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Installing ImageMagic at Multiple PHP Version
« on: August 26, 2016, 07:33:33 AM »
Hi,
Just for introduction, i am using CentOS from 2009, and using it for webserver as default or standard installation CentOS.
i discover a new panel named zPanel/sentora, well that make me really happy, but still lack of performance since it not have user limitation.
a few days a go, i found this CWP, and i try it. It really amazing, almost same like cPanel. but i still don't know how it works since it more complicated than zPanel / sentora, but that not make me frustrate, since i already know how apache/php/bind/postfix and all component works. it only a matter of time to find it out.

The problem is come when i need to use ImageMagic at PHP56 and PHP7. Since PHP module only apply to the same version PHP with CWP, usualy i use remi repo for multyple php version, but this CWP is different.

Can't give up, keep finding how to make it works, then the final comes up, here the script.
Code: [Select]
#!/bin/bash

echo "CWP Imagick Installer PHP56"
echo "################################"
echo ""

yum -y install ImageMagick ImageMagick-devel ImageMagick-perl
cd /usr/local/src
rm -Rf imagick-3.4.3RC1
rm -Rf imagick-3.4.3RC1.tgz
wget https://pecl.php.net/get/imagick-3.4.3RC1.tgz
tar zxf imagick-3.4.3RC1.tgz
cd imagick-3.4.3RC1
/opt/alt/php56/usr/bin/phpize
./configure --with-php-config=/opt/alt/php56/usr/bin/php-config --with-imagick
make clean
make
make install
echo ""
grep "imagick.so" /opt/alt/php56/usr/php/php.ini || echo "extension=imagick.so" >> /opt/alt/php56/usr/php/php.ini
/opt/alt/php56/usr/bin/php -m|grep imagick && echo "Imagick Installed, please restart apache to load changes !" || echo "Imagick NOT Installed !"
Code: [Select]
#!/bin/bash

echo "CWP Imagick Installer PHP7"
echo "################################"
echo ""

yum -y install ImageMagick ImageMagick-devel ImageMagick-perl
cd /usr/local/src
rm -Rf imagick-3.4.3RC1
rm -Rf imagick-3.4.3RC1.tgz
wget https://pecl.php.net/get/imagick-3.4.3RC1.tgz
tar zxf imagick-3.4.3RC1.tgz
cd imagick-3.4.3RC1
/opt/alt/php7/usr/bin/phpize
./configure --with-php-config=/opt/alt/php7/usr/bin/php-config --with-imagick
make clean
make
make install
echo ""
grep "imagick.so" /opt/alt/php7/usr/php/php.ini || echo "extension=imagick.so" >> /opt/alt/php7/usr/php/php.ini
/opt/alt/php7/usr/bin/php -m|grep imagick && echo "Imagick Installed, please restart apache to load changes !" || echo "Imagick NOT Installed !"

Hope more good script comes up here.
Love this CWP
NOTE For moderator: Please move this topic if i post at wrong place.

Thanks
« Last Edit: August 26, 2016, 07:36:08 AM by hrace009 »