ImagickをXserverにインストール

参考URL

libpngをインストール

mkdir ~/temp
cd ~/temp
wget http://www.imagemagick.org/download/delegates/libpng-1.6.24.tar.gz
tar zxvf libpng-1.6.24.tar.gz
cd libpng-1.6.24
./configure --prefix=$HOME/local/ CFLAGS="-I$HOME/local/include" LDFLAGS="-L$HOME/local/lib" CPPFLAGS="-I$HOME/local/include"
make
make install
cd ..

JPEGライブラリをインストール

wget http://www.imagemagick.org/download/delegates/jpegsrc.v9a.tar.gz
tar zxvf jpegsrc.v9a.tar.gz
./configure --prefix=$HOME/local/ CFLAGS="-I$HOME/local/include" LDFLAGS="-L$HOME/local/lib" CPPFLAGS="-I$HOME/local/include"
make
make install
cd ..

ImageMagickをインストール

wget http://www.imagemagick.org/download/ImageMagick.tar.gz
tar zxvf ImageMagick.tar.gz
cd ImageMagick-7.0.2-10
./configure --prefix=$HOME/local/ CFLAGS="-I$HOME/local/include" LDFLAGS="-L$HOME/local/lib" CPPFLAGS="-I$HOME/local/include" PKG_CONFIG_PATH="$HOME/local/lib/pkgconfig"
make
make install
~/local/bin/convert --version 
cd ..

Imagickをインストール

wget https://pecl.php.net/get/imagick-3.4.2.tgz
tar xvzf imagick-3.4.2.tgz
cd imagick-3.4.2
/opt/php-5.6.22/bin/phpize
./configure --with-imagick=$HOME/local --with-php-config=/opt/php-5.6.22/bin/php-config
make
cd modules
cp ./imagick.so ~/local/lib/

php.iniにimagick.soへのパスを追記する

[imagick]
extension = /home/your_account/local/lib/imagick.so

Last-modified: 2016-08-29 (月) 19:00:35 (691d)