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
2009-09-27 10:35 举报
已邀请:
0

王健

赞同来自:

为什么我在安装php的时候按照这个编译会出现
1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)

新手 求教

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: