日期:2014-05-16  浏览次数:20763 次

linux下php5源码编译安装实践
    php5源码编译安装,以及一些组件的安装:

a.安装 jpeg7
# tar -zvxf jpegsrc.v7b.tar.gz
# cd jpeg-7b
# ./configure --prefix=/usr/local/jpeg7/ --enable-shared --enable-static
# make; make install

b.安装libpng
# tar -zvxf libpng-1.2.8.tar.gz
# cd libpng-1.2.8
# cp scripts/makefile.std makefile
# make; make install

c.安装 freetype
# tar -zvxf freetype-2.1.10.tar.gz
# cd freetype-2.1.10
# mkdir -p /usr/local/freetype
# ./configure --prefix=/usr/local/freetype
# make;make install

d.:安装zlib
#tar -zxvf zlib-1.2.3.tar.gz
#cd zlib.1.2.3
# ./configure
# make;make install

e.安装gd库
# tar -zvxf gd-2.0.33.tar.gz
# mkdir -p /usr/local/gd2
# cd gd-2.0.33
# ./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg7/
--with-png=/usr/local/lib/
--with-zlib=/usr/local/lib/
--with-freetype=/usr/local/freetype/
# make; make install

f.安装php
#libs='-lresolv' ./configure -prefix=/usr/local/php --with-apxs2=/usr/sbin/apxs  --with-mysql=/usr/local/mysql  --with-pdo-mysql=/usr/local/mysql --without-pear -with-gd=/usr/local/gd2/ --with-jpeg-dir=/usr/local/jpeg7/ --with-zlib-dir=/usr/local/lib/ --with-png-dir=/usr/local/lib/ --with-freetype-dir=/usr/local/freetype/

#make && make install