jpegsrc.v6b.tar.gz
libpng-1.2.7.tar.tar
freetype-2.1.9.tar.gz
gd-2.0.33.tar.gz
1.安装zlib
# tar zxvf zlib-1.2.5.tar.gz //解压
# cd zlib-1.2.5 //改变目录
# CFLAGS=”-O3 -fPIC” ./configure //使用64位的方法进行编译 (一般只需要./configure)
# make
# make install
cd libpng-1.2.7
cd scripts/
mv makefile.linux ../makefile
cd ..
make
make install
注意,这里的makefile不是用./configure生成,而是直接从scripts/里拷一个
cd freetype-2.1.9
./configure --prefix=/usr/local/modules/freetype
make
make install
# wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz //下载
# tar jpegsrc.v8b.tar.gz //解压
# cd jpeg-8b //改变目录
# ./configure –prefix=/usr/local/modules/jpeg7 –enable-shared –enable-static //配置
# make //编译
# make install //安装
e.GD
# wget http://www.boutell.com/gd/http/gd-2.0.33.tar.gz //下载
# tar xzvf gd-2.0.33.tar.gz //解压
# cd gd-2.0.33 //改变目录
# ./configure –prefix=/usr/local/modules/gd –with-jpeg=/usr/local/modules/jpeg7 –with-png=/usr/local/libpng –with-zlib –with-freetype=/usr/local/modules/freetype //配置
# make //编译
# make install //安装
4.PHP
a.libxml2 //只拓展gd,这个可以不装
# wget ftp://xmlsoft.org/libxml2/libxml2-2.7.2.tar.gz //下载
# tar zxvf libxml2-2.7.2.tar.gz //解压
# cd libxml2-2.7.2 //改变目录
# ./configure –prefix=/usr/local/libxml2 //配置
# make //编译
# make install //安装
# wget http://curl.haxx.se/download/curl-7.19.0.tar.gz //下载
# tar -zxvf curl-7.19.0.tar.gz //解压
# cd curl-7.19.0 //改变目录
# ./configure –prefix=/usr/local/curl //配置
# make //编译
# make install //安装
# wget http://cn.php.net/get/php-5.2.8.tar.bz2/from/us.php.net/mirror
# tar jxvf php-5.2.8.tar.bz2
# cd php*
./configure --prefix=/opt/app/php5 --with-mysql=/opt/app/mysql --with-curl=/opt/app/curl --with-gd=/usr/local/modules/gd --enable-gd-native-ttf --with-jpeg-dir=/usr/local/modules/jpeg7 --with-png-dir=/usr/local/libpng --with-freetype-dir=/usr/local/modules/freetype --with-zlib --enable-fastcgi --enable-debug --enable-sockets //只拓展gd的安装步族,curl是先前安装的
# make
# make install
重启php即可
# cp php.ini-dist /usr/local/php/etc/php.ini (这句。。。)