php 编译(针对Apache)
PHP需要MySQL客户端模块支持,需要下载MySQL软件。
# cd /usr/local/src
# tar zvxf mysql-5.0.67-linux-i686-icc-glibc23.tar.gz
# mv mysql-5.0.67-linux-i686-icc-glibc23 /usr/local/mysql
# tar zvxf php-5.2.8.tar.gz
# cd php-5.2.8
# ./configure --prefix=/usr/local/php \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-config-file-path=/usr/local/php/etc \
--with-mysql=/usr/local/mysql \
--with-libxml-dir \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-iconv-dir \
--with-zlib-dir \
--with-bz2 \
--with-openssl \
--with-mcrypt \
--enable-soap \
--enable-gd-native-ttf \
--enable-ftp \
--enable-mbstring \
--enable-sockets \
--enable-exif \
--disable-ipv6 \
--disable-cgi \
--disable-cli
# make
# make install
# mkdir /usr/local/php/etc
# cp php.ini-dist /usr/local/php/etc/php.ini
# cd /usr/local/src
# tar zvxf mysql-5.0.67-linux-i686-icc-glibc23.tar.gz
# mv mysql-5.0.67-linux-i686-icc-glibc23 /usr/local/mysql
# tar zvxf php-5.2.8.tar.gz
# cd php-5.2.8
# ./configure --prefix=/usr/local/php \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-config-file-path=/usr/local/php/etc \
--with-mysql=/usr/local/mysql \
--with-libxml-dir \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-iconv-dir \
--with-zlib-dir \
--with-bz2 \
--with-openssl \
--with-mcrypt \
--enable-soap \
--enable-gd-native-ttf \
--enable-ftp \
--enable-mbstring \
--enable-sockets \
--enable-exif \
--disable-ipv6 \
--disable-cgi \
--disable-cli
# make
# make install
# mkdir /usr/local/php/etc
# cp php.ini-dist /usr/local/php/etc/php.ini
none