ImageMagick installed and php imagick extension (rpm) under linux

ImageMagick installed and expanded the linux php imagick

PHP version 7.1.3;
ImageMagick版本 ImageMagick-7.0.8-3;
PHP extension imagick version imagick-3.4.3RC3;

ImageMagick installation (first step)

ImageMagick website
http://www.imagemagick.org/script/install-source.php
first download ImageMagick, a new version of ImageMagick-7.0.8-3

1. Download the installation package ImageMagick

2. Extract the installation package

#tar xvfz ImageMagick.tar.gz

3. Go to File

#cd ImageMagick-6.8.6-7/

4 ... set the installation path behind the mounting extensions need to use php;. / Usr / local / imagemagick

#./configure --prefix=/usr/local/imagemagick

5. Compile

#make && make install

PHP imagick extension installed (second step)

Official website address: http://pecl.php.net/package/imagick

1. Download imagick-3.4.3RC3

2. Extract the installation package

#tar zxvf imagick-3.4.3RC3.tgz

3. Enter the installation file

#cd imagick-3.4.3RC3/

4. Execute the command phpize

#/usr/local/php/bin/phpize

5.ImageMagick 6.8 or later directory / usr / local / include / ImageMagick-X, do first before you configure under soft connection

#ln -s /usr/local/imagemagick/include/ImageMagick-7 /usr/local/imagemagick/include/ImageMagick

6. Perform configure configuration

./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/imagemagick

7. Compile

#make
#make install

(carry out)

 

The solution can not be installed when imagick

First make sure there are various formats of image proxy is not installed

> Install ImageMagick Agent 
- jpeg agency https://www.imagemagick.org/download/delegates/jpegsrc.v9b.tar.gz 
- PNG agent: https://www.imagemagick.org/download/delegates/libpng-1.6. 31.tar.gz 
- GIF agent https://www.imagemagick.org/download/delegates/freetype-2.8.1.tar.gz

 The alpine docker apk system requires the installation:

apk add jpeg-dev libpng-dev freetype-dev

Sometimes you will be prompted to install imagick is:

1
“configure: error: not found. Please provide a path to MagickWand-config  or  Wand-config program.”

This is because only installed "ImageMagick" but not installed "ImageMagick-devel", ImageMagick-devel-line installation following command, and then re-installed according to the above steps imagick like.

1
yum install ImageMagick-devel

 or

sudo apt-get install libmagickcore-dev libmagickwand-dev

Extended - PHP imagick extension installation problems (second step) may encounter solve:

(; Configure through error error when make: wand / MagickWand.h: No such file or directory
Solution:
# yum install gtk2-devel
#export PKG_CONFIG_PATH = / usr / local / ImageMagick / lib / pkgconfig /
;
; then reinstall imagick
;
#cd imagick-3.4.3RC3 /
# / usr / local / PHP / bin / the phpize
. # / Configure-PHP --with-config = / usr / local / PHP / bin / PHP-config --with = -imagick / usr / local / ImageMagick
#make
#make the install)

Modify the PHP configuration file (third step)

Modify the php.ini file, add extension = fileinfo.so

Restart nginx and php

nginx restart command: systemctl restart nginx

php restart command: systemctl restart php-fpm

(Note: check the numbers before and after the restart the process if successful reboot)

PHP version 7.1.3;
ImageMagick版本 ImageMagick-7.0.8-3;
PHP extension imagick version imagick-3.4.3RC3;

ImageMagick installation (first step)

ImageMagick website
http://www.imagemagick.org/script/install-source.php
first download ImageMagick, a new version of ImageMagick-7.0.8-3

1. Download the installation package ImageMagick

2. Extract the installation package

#tar xvfz ImageMagick.tar.gz

3. Go to File

#cd ImageMagick-6.8.6-7/

4 ... set the installation path behind the mounting extensions need to use php;. / Usr / local / imagemagick

#./configure --prefix=/usr/local/imagemagick

5. Compile

#make && make install

PHP imagick extension installed (second step)

Official website address: http://pecl.php.net/package/imagick

1. Download imagick-3.4.3RC3

2. Extract the installation package

#tar zxvf imagick-3.4.3RC3.tgz

3. Enter the installation file

#cd imagick-3.4.3RC3/

4. Execute the command phpize

#/usr/local/php/bin/phpize

5.ImageMagick 6.8 or later directory / usr / local / include / ImageMagick-X, do first before you configure under soft connection

#ln -s /usr/local/imagemagick/include/ImageMagick-7 /usr/local/imagemagick/include/ImageMagick

6. Perform configure configuration

./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/imagemagick

7. Compile

#make
#make install

(carry out)

 

The solution can not be installed when imagick

First make sure there are various formats of image proxy is not installed

> Install ImageMagick Agent 
- jpeg agency https://www.imagemagick.org/download/delegates/jpegsrc.v9b.tar.gz 
- PNG agent: https://www.imagemagick.org/download/delegates/libpng-1.6. 31.tar.gz 
- GIF agent https://www.imagemagick.org/download/delegates/freetype-2.8.1.tar.gz

 The alpine docker apk system requires the installation:

apk add jpeg-dev libpng-dev freetype-dev

Sometimes you will be prompted to install imagick is:

1
“configure: error: not found. Please provide a path to MagickWand-config  or  Wand-config program.”

This is because only installed "ImageMagick" but not installed "ImageMagick-devel", ImageMagick-devel-line installation following command, and then re-installed according to the above steps imagick like.

1
yum install ImageMagick-devel

 or

sudo apt-get install libmagickcore-dev libmagickwand-dev

Extended - PHP imagick extension installation problems (second step) may encounter solve:

(; Configure through error error when make: wand / MagickWand.h: No such file or directory
Solution:
# yum install gtk2-devel
#export PKG_CONFIG_PATH = / usr / local / ImageMagick / lib / pkgconfig /
;
; then reinstall imagick
;
#cd imagick-3.4.3RC3 /
# / usr / local / PHP / bin / the phpize
. # / Configure-PHP --with-config = / usr / local / PHP / bin / PHP-config --with = -imagick / usr / local / ImageMagick
#make
#make the install)

Modify the PHP configuration file (third step)

Modify the php.ini file, add extension = fileinfo.so

Restart nginx and php

nginx restart command: systemctl restart nginx

php restart command: systemctl restart php-fpm

(Note: check the numbers before and after the restart the process if successful reboot)

Guess you like

Origin www.cnblogs.com/showker/p/11272130.html