1.Mono的安装
在CentOS 5 Lin上,按照代码5-2中的步骤安装mono:

从SVN版本库安装fast-mono-server,其代码5-3所示:

以FastCGI方式启动fast-mono-server2,监听本机的9001端口,网页根目录为、datao/htdocs/www/:
nohup /bin/sh /usr/local/bin/fastcgi-mono-server2 /sockrt=tcp:9001
/root=/datao/htdocs/www/ 2>&1>dev/null &
2.Nginx与ASP.NET(Mono+FastCGI)的配置
nginx.conf配置文件内容如代码5-4所示。在配置文件中,静态HTML网页、图片、JS、CSS、Flash等使用Nginx来处理,以便得到更快的速度,文件扩展名为。aspx、.asmx、.ashx、.asax、.ascx、.soap、.rem、.axd、.cs、.config、.dll的请求,由Nginx交给fast-mono-server2进程去处理:

启动Nginx:
/uer/local/webserver/nginx/sbin/nginx
如果Nginx处于运行状态,也可以使用nginx-t检查nginx.conf配置文件无错误后,使用“kill-HUP Nginx主进程号”来平滑重启Nginx。
Nginx启动后,我们可以在/data0/htdocs/www/目录下下载一个名为info.aspx的ASP.NET探针文件,以检查ASP.NET程序能否正常运行:
cd/data0/htdocs/www/
wget http://aspnetsysinfo.googlecode.com/files/aspnetsysinfo-revision_23.zip
unzip aspnetsysinfo-revision_23.zip
通过浏览器访问http://www...yourdomain.com/info.aspx,如果一切正常,则显示的内容如表5-1所示:
