Today the editor used the imagick extension due to work needs. The server environment is lnmp architecture. Let’s briefly introduce this stuff
Okay, after reading the above introduction, you will know how powerful imagick is. Now let’s install it step by step
# wget ftp://ftp.u-aizu.ac.jp/pub/graphics/image/ImageMagick/imagemagick.org/ImageMagick.tar.gz
Download here is the latest version of ImageMagick. After downloading, we unzip
#tar -xzvf ImageMagick.tar.gz //After decompressing, we enter this directory
#cd ImageMagick-6.8.6-5 // This is the name of the ImageMagick directory after I decompressed it
# ./configure --prefix=/usr/local/imagemagick // The first step is to configure and install this without any problems.
# make Step 3
# wget http://pecl.php.net/get/imagick-3.1.0b1.tgz //The download address will change at any time, depending on
# tar -xzvf imagick.tar.gz //Unzip
# cd imagick-3.0.1 #phpize
//In the first step, pay attention to the php configuration path you installed at the time
Oh, I cried when the installation got to this point. You scumbag, you even said that you can’t find MagickWand.h
When I saw this mistake, I asked Du Niang. This is what the Internet said
I followed the online operation and did this
Continue
# ./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/imagemagick
An error message came out again. I was confused. Are you trying to play with me?
I asked Du Niang again. .
Let’s first find the location ofpkgconfig
# find /usr/local/ -name pkgconfig
The result is out/usr/local/lib/pkgconfig
/usr/local/apache--/lib/pkgconfig/usr/local/libxml2/lib/pkgconfig
/usr /local/imagemagick/lib/pkgconfig
I found so many pkgconfigs. This must be the imagemagick pkgconifg directory
#
/usr/local/php/bin/phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config
# export PKG_CONFIG_PATH=/usr/local/imagemagick/lib/pkgconfig
# make //The second step
# make install //Complete
The execution result is displayed
It means the installation is successful
imagick.so is generated in the /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/ directory
Modify php.ini configuration
# vi /usr/local/php/etc/php.ini
Modify to
extension_dir = /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
Add a line
imagick.so //This is an extension that adds imagick
The last step is apache restart if it is an apache server
The editor uses nginx /usr/local/nginx/sbin/nginx -s reload This has no effect
Only
#kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid` This works because nginx runs through php-fpm. Only restarting Valid
Okay let’s print phpinfo
The installation of imagick is completed. .
with
http://www.bkjia.com/PHPjc/699425.html