cd/var/software
tar zxvf libiconv-1.11.tar.gz
cd libiconv-1.11/
./configure--prefix=/usr/local
make
make install
cd../
tar zxvf freetype-2.3.5.tar.gz
cd freetype-2.3.5/
./configure
make
make install
cd../
tar zxvf libpng-1.2.29.tar.gz
cd libpng-1.2.29/
./configure
###mv scripts/makefile.linux ./makefile
make
make install
cd../
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b/
./configure--enable-static --enable-shared
make
make install
make install-lib
cd../
tar zxvf libxml2-2.6.30.tar.gz
cd libxml2-2.6.30/
./configure
make
make install
cd../
tar zxvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8/
./configure
make
make install
/sbin/ldconfig
cd libltdl/
./configure--enable-ltdl-install
make
make install
cd../../
tar zxvf mhash-0.9.9.tar.gz
cd mhash-0.9.9/
./configure
make
make install
cd../
cd/var/software
tar zxvf php-5.2.6.tar.gz
cd php-5.2.6
./configure--prefix=/usr/local/webserver/php--with-config-file-path=/usr/local/webserver/php/etc--with-mysql=/usr/local/webserver/mysql--with-iconv-dir=/usr/local--with-freetype-dir--with-jpeg-dir--with-png-dir--with-zlib--with-libxml-dir--enable-xml--disable-debug--enable-discard-path--enable-safe-mode--enable-bcmath--enable-shmop--enable-sysvsem--enable-inline-optimization--with-curl--with-curlwrappers--enable-mbregex--enable-fastcgi--enable-force-cgi-redirect--enable-mbstring--with-mcrypt--disable-ipv6--enable-soap--with-openssl--with-gettext--disable-rpath
sed-i's#-lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt#& -liconv#'Makefile
make
make install
cp php.ini-dist/usr/local/webserver/php/etc/php.ini
cd../
八、编译安装PHP5扩展模块
PHP 代码:
tar zxvf memcache-2.2.3.tgz
cd memcache-2.2.3/
/usr/local/webserver/php/bin/phpize
./configure--with-php-config=/usr/local/webserver/php/bin/php-config
make
make install
cd../
cd php-5.2.6/ext/gd/
/usr/local/webserver/php/bin/phpize
./configure--with-jpeg-dir--with-png-dir--with-zlib-dir--with-ttf--with-freetype-dir--with-php-config=/usr/local/webserver/php/bin/php-config
make
make install
cd../../../
tar zxvf pcre-7.6.tar.gz
cd pcre-7.6/
./configure
make&&make install
cd../
2、安装Nginx。
PHP 代码:
tar zxvf nginx-0.5.35.tar.gz
cd nginx-0.5.35/
./configure--user=www--group=www--prefix=/usr/local/webserver/nginx--with-http_stub_status_module
make
make install
cd../
the configuration file/usr/local/webserver/nginx/conf/nginx.conf syntax is ok
the configuration file/usr/local/webserver/nginx/conf/nginx.conf was tested successfully