ls /media/cdrom/Server/*httpd*
rpm -ivh /media/cdrom/Server/httpd-2.2.3-6.e15.i386.rpm
tar zxvf httpd-2.2.9.tar.gz -C /usr/src/
./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --enable-ssl --with-ssl=/usr/lib --enable-auth-digest --enable-cgi --enable-suexec --with-suexec-caller=daemon --with-suexec-docroot=/usr/local/apache2/htdocs
vi /usr/local/apache2/conf/httpd.conf
/usr/local/apache2/bin/apachectl -t 或者
/usr/local/apache2/bin/httpd -t
/usr/local/apache2/bin/apachect1 start
vi /etc/rc.d/rc.local //添加以下这行的内容
/usr/local/apache2/bin/apachect1 start
tar zxvf mysql-5.0.56.tar.gz –C /usr/src/
make && make install
cp support-file/my-medium.cnf /etc/my.cnf
/usr/local/mysql/bin/mysql_install_db –user=mysql
chown –R mysql /usr/local/mysql/var
echo “/usr/local/mysql/lib/mysql” >> /etc/ld.so.conf
/usr/local/mysql/bin/mysql_safe –user=mysql &
cp support-files/mysql.server /etc/init.d/mysqld
export PATH=$PATH:/usr/local/mysql/bin
echo “PATH+$PSTH:/usr/local/mysql/bin” >> /etc/profile
1. 解压
tar zxvf php-5.2.6.tar.gz –C /usr/src/
2. 预先配置编译安装时的参数
./configure –prefix=/usr/local/php5 --enable-mbstring --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php5
3. 编译并安装
4. 设置httpd.conf文件
Vi /usr/local/apache2/conf/httpd.conf
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
5. 调整httpd.conf文件中的首页文件设置
DirectoryIndex index.php index.html
6. 测试php运行环境
vi /usr/local/apache2/htdocs/testdb.php