apache2 + fastcgi +php

1、安装apache
  安装apache相对简单:下载apache2;
  tar zxvf apache2
  cd apache2
  ./configure (可根据需要安装合适的模块)
  make && make install

2、安装php(fastcgi模式)
  下载php
  tar zxvf php
  ./configure --prefix=/usr/local/php-cgi --disable-cli --enable-fastcgi (--enable-fastcgi是必须要加的。我在安装的过程中发现--disable-cli也要加上。不然安装成功后php不是fcgi模式的)
   make && make install
  安装完成后,确定安装是否正确
  /usr/local/php-cgi/bin/php-cgi -v
  如显示(php 5...(cgi-fcgi)说明php是以fastcgi模式安装了)

3、最后安装fastcgi
   下载fastcgi(http://www.fastcgi.com/dist/)
   tar zxvf mod_fastcgi
   安装fastcgi.这里有一点要注意,针对apache2和apache2之前的版本,安装略有区别,这里需要特别注意。
   以apache2说明安装过程。(apache2之前的版本参照安装目录中的INSTALL中的描述安装)
           $ cd <mod_fastcgi_dir>
     17     $ cp Makefile.AP2 Makefile
     18     $ make
     19     $ make install
     20
     21     If your Apache2 installation isn't in /usr/local/apache2, then
     22     set the top_dir variable when running make (or edit the
     23     Makefile), e.g.
     24
     25       $ make top_dir=/opt/httpd/2.0.40
     26
     27     Add an entry to httpd.conf like this:
     28
     29       LoadModule fastcgi_module modules/mod_fastcgi.so
  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值