Home >php教程 >php手册 >Linux+MYSQL+Apache+PHP的安装

Linux+MYSQL+Apache+PHP的安装

WBOY
WBOYOriginal
2016-06-21 08:59:561240browse

    由于工作需要,这几天一直在研究Linux+Apache+Php+Mysql的安装.最初,在google上搜了下"Linux myqsl apache php",搜出来N多记录安装的文章,从里边挑了几篇试试着装,均义失败告终.具郁闷.网上的文章都是抄来抄去,实在意义不大.后来偶去php的官方网站www.php.net,找到PHP Manual,依据上面的步骤,安装成功.

    教训:尽量从本源处去寻求解决问题的方法,如官方网站,程序自带的README,INSTALL文档.
         抓住本质,寻求计算机科学的精髓.

    下面将我的安装步骤写下来
     环境: Redhat FedoraCore3
           Apache_1.3.34   PHP-4.0.2
     几点说明: 本步骤不保证其他版本能安装成功,对于Apache-2有些不同,详见www.php.net
               本步骤采用的是把PHP以DSO的方式安装到Apache中,静态方式安装略有不同
    步骤:
           tar -zxvf Apache_1.3.34.tar.gz
           cd Apache_1.3.34
           ./configure --prefix=/usr/local/apache --enable-module=so
           make
           make install
 
           tar -zxvf php-4.0.2.tar.gz
           cd php-4.0.2
           ./configure --with-apxs=/usr/local/apache/bin/apxs
           make
           make install
          
           cd Apache_1.3.34
           cp php.ini-dist  /usr/local/lib

           修改Apache的配置文件httpd.conf,添加
           AddType application/x-httpd-php .php        
          
           重起Apache服务器
          
           编写测试文档info.php
          



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn