安装源码包 httpd-2.2.22.tar.bz2 php-5.4.10.tar.bz2 使网站能够解析如下内容

 mount /dev/cdrom /mediaphp

    cd /media
    ls
    rpm -qa |grep httpd
    rpm -e httpd-2.2.3-45.el5
    rpm -e httpd-2.2.3-45.el5 --nodeps
    rpm -qa |grep httpd
    clear
    ls
    tar jxf httpd-2.2.22.tar.bz2 -C /root
    cd
    ls
    cd httpd-2.2.22/
    ls
  
    ./configure --prefix=/usr/local/httpd --enable-so --enable-rewrite
    make && make install
    cd /usr/local/httpd/bin
    ls
    ./httpd
    ./httpd
    pstree -p |grep httpd
    ifconfig
    clear
    elinks http://192.168.1.2 --dump
    clear
    cd
    clear
    ls
    cd /media
    ls
    tar jxf php-5.4.10.tar.bz2 -C /root
    cd
    clear
    cd php-5.4.10/
    ls
    ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs
    make && make install
    clear
    cd /usr/local/httpd/conf/
    ls
    cat httpd.conf.bak
    clear
    vim httpd.conf  (在LoadModule php5_module        modules/libphp5.so下面添加以下内容:
    AddType application/x-httpd-php .php)
 
    killall httpd
    cd ..
    cd bin
    ./httpd
    ./httpd
    clear
    pstree -p |grep httpd
    clear
    cd /usr/local/httpd/
    ls
    cd htdocs/
    ls
    vim phpinfo.php  (里面写入<?php phpinfo(); ?>此内容)
  
    clear
    firefox http://192.168.1.2/phpinfo.php
    killall httpd
    cd ..
    cd bin/
    ./httpd
    ls
    ./httpd
    cd /usr/local/httpd/htdocs/
    ls
    cat phpinfo.php 
    vim phpinfo.php 
    firefox http://192.168.1.2/phpinfo.php