码迷,mamicode.com
首页 > Web开发 > 详细

php安装imagemagick扩展

时间:2020-01-14 19:03:41      阅读:264      评论:0      收藏:0      [点我收藏+]

标签:sha   ftp   pts   $path   php安装   try   修改环境变量   zip2   none   

1. 安装一些必要的yum

yum install tcl-devel.x86_64 libpng-devel.x86_64 libjpeg-devel.x86_64 ghostscript-devel.x86_64 bzip2-devel.x86_64 freetype-devel.x86_64 libtiff-devel.x86_64
yum install libjpeg-devel.x86_64 libpng-devel.x86_64 glib2-devel.x86_64 fontconfig-devel.x86_64 zlib-devel.x86_64 libwmf-devel.x86_64 freetype-devel.x86_64 libtiff-devel.x86_64

2. 安装zlib

tar zxvf zlib-1.2.8.tar.gz

cd zlib-1.2.8

./configure

make

make install

3.步骤3:安装libpng

tar zxvf libpng-1.4.4.tar.gz
cd libpng-1.6.21
cd scripts/
mv makefile.linux ../makefile
cd ..
make
make install

4.安装freetype

tar zxvf freetype-2.1.10.tar.gz
cd freetype-2.1.10
./configure
make
make install

5.安装Jpeg

wget http://www.imagemagick.org/download/delegates/jpegsrc.v9b.tar.gz
tar zxvf pegsrc.v9b.tar.gz 
cd jpeg-9b
./configure --enable-shared 
make libdir=/usr/lib64   
make libdir=/usr/lib64 install

6.安装ImageMagick

wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar -xzvf ImageMagick-6.6.8-10.tar.gz  
./configure --prefix=/usr/local/imagemagick  
make  
make install  

7.修改环境变量

vim /etc/profile
export PATH=$PATH:$JAVA_HOME/bin:**/usr/local/imagemagick/bin**
source /etc/profile

8.测试(可选)

convert test.jpg a.jpg -geometry +75+180 -composite f_over.jpg

convert -background none -fill white -pointsize 36 label:A label_A_white.png

php安装imagemagick扩展

标签:sha   ftp   pts   $path   php安装   try   修改环境变量   zip2   none   

原文地址:https://www.cnblogs.com/ifme/p/12193580.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!