在ubuntu16.04上fileinfo和imagick的php扩展安装记录

http://www.linuxidc.com/Linux/2017-10/147873.htm

http://www.osyunwei.com/archives/5327.html

http://www.chhua.com/web-note5323 //这个

fileinfo的安装

在php源码的ext里有fileinfo的扩展 进入 使用phpize命令
  ./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
添加php.ini extension=fileinfo.so

Ubuntu安装Imagick

I. 安装ImageMagick

wget  http://www.imagemagick.org/download/ImageMagick.tar.gz
tar zxvf ImageMagick.tar.gz
cd ImageMagick-6.8.9-7`
./configure --prefix=/usr/local/ImageMagick/ --enable-lzw --with-modules --with-quantum-depth=8 --enable-shared --disable-openmp
make && make install

II. 安装imagemagick 的lib 供php调用

sudo apt-get install libmagick++-dev

III. 调用当前的pecl安装imagick

pecl install imagick

IV. 修改php.ini.重启apache服务器 在php.ini中添加: extension = imagick.so

https://www.cnblogs.com/yida915/p/6473434.html

PHP扩展imagick安装

wget  http://pecl.php.net/get/imagick-3.1.2.tgz](http://pecl.php.net/get/imagick-3.1.2.tgz
tar zxvf imagick-3.1.2.tgz
cd imagick-3.1.2
phpize  //每个服务器位置不一样
./configure --with-php-config=/你的php路径/php-config --with-imagick=/usr/local/ImageMagick/
make && make install

imagick无法安装时的解决办法

这是因为只安装了“ImageMagick”而没有安装“ImageMagick-devel”,通过下面的命令行安装ImageMagick-devel,然后重新按上面的步骤安装imagick就好了。
yum install ImageMagick-devel

你可能感兴趣的:(在ubuntu16.04上fileinfo和imagick的php扩展安装记录)