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
安装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