已有环境下增添GD库

在已有环境加载GD库,我们需要根据系统依次安装相关包

packages:

zlib

freetype

libpng

jpeg(可选)


a.安装zlib

tar xzvf zlib-1.2.3.tar.gz

cd zlib-1.2.3

./configure

make

make install


b.安装freetype

tar xzvf freetype-2.3.7.tar.gz

cd freetype-2.2.1

./configure

make

make install


c.安装libpng

tar xzvf libpng-1.2.33.tar.gz

cd libpng-1.2.12

cp scripts/makefile.std makefile

make test

make install


d.安装jpeg(可选)

建立文件夹:/usr/local/man/man1

tar xzvf jpegsrc.v6b.tar.gz

./configure --enable-shared --enable-static

make

make install


e、安装gd

tar xzvf gd-2.0.18.tar.gz

./configure --with-jpeg --with-png --with-zlib --with-freetype

make

make install


f.重新配置安装php

1.make clean

2.在当前配置基础上添加GD参数

./configure --with-gd --with-png

3.make && make install

[@more@]

重做php之前我们建议先看下当前配置

1.使用php -i 查看配置

2.在源位置查看config.log,记录下./configure......所有

请使用浏览器的分享功能分享到微信等