只使用./configure --with-mysql这句是不行的,呵呵
配置PHP:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-apache2=/path上面是APACHE 2.X版本

解决方案 »

  1.   

    不行啊大哥,可能是我的apache版本低?
    我已经卸掉了apache,准备安装rpm版本,
    那里有下载啊,请问?
      

  2.   

    安装mysql-4.0.14.tar.gz、apache_1.3.28.tar.gz、php-4.3.2.tar.gz在安装Redhat Linux 8.0的时候,不要安装www服务器和SQL服务器,要安装开发工具一、MySQL
    shell> groupadd mysql
    shell> useradd -g mysql mysql
    shell> tar zxvf mysql-4.0.14.tar.gz
    shell> cd mysql-4.0.14.tar.gz
    shell> ./configure --prefix=/usr/local/mysql --with-charset=gb2312
    shell> make
    shell> make install
    shell> scripts/mysql_install_db
    shell> chown -R root  /usr/local/mysql
    shell> chown -R mysql /usr/local/mysql/var
    shell> chgrp -R mysql /usr/local/mysql
    shell> cp support-files/my-medium.cnf /etc/my.cnf
    shell> /usr/local/mysql/bin/mysqld_safe --user=mysql &可以更改用户密码(root):
    shell> cd /usr/local/mysql/bin
    shell> ./mysqladmin –u root –p password 新密码
    Enter password:输入回车就OK了自动加载和关闭MySQL
    /usr/local/mysql/share/mysql/mysql.server复制到/etc/init.d
    shell>chkconfig --add mysql.server使MySQL在开机时自动运行将下面的命令映射到/usr/local/bin目录下,这样可以在任何地方使用它
    shell> cd /usr/local/bin
    shell> ln -fs /usr/local/mysql/bin/mysql mysql二、Apache
    shell> cd /usr/local/src/apache_1.3.28
    shell> ./configure --prefix=/usr/local/apache --enable-module=so
    shell> make
    shell> make install将下面的命令映射到/usr/local/bin目录下,这样可以在任何地方使用它
    shell> cd /usr/local/bin
    shell> ln -fs /usr/local/apache/bin/apachectl apachectl三、PHP
    shell> ../php-4.3.2
    shell> ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs  --enable-track-vars --enable-bcmath --enable-mbstring
    shell> make
    shell> make install
    shell> cp php.ini-dist /usr/local/lib/php.ini
    修改php.ini
    将magic_quotes_gpc=On改为Off
    将register_globals=Off改为On最后,修改/usr/local/apache/conf/httpd.conf,确保有下面的语句:
    AddType application/x-httpd-php .php
    LoadModule php4_module libexec/libphp4.so再重启Apache就OK了
    shell> apachectl start在/etc/rc.d/rc.load中加入一行:/usr/local/apache/bin/apachectl start就可以开机自动启动Apache。附:
    如果在配置一次失败后,要再配置,要用下面的方法之一清空缓存文件:
    shell> rm config.cache
    shell> make clean

    shell> make distclean