Chinaunix

标题: 在 Arch Linux 下配置 ASP.NET 运行环境 [打印本页]

作者: zhanghui8059    时间: 2009-09-02 14:29
标题: 在 Arch Linux 下配置 ASP.NET 运行环境
昨天我们成功配置了 Lighttpd + FastCGI + PHP,今天我们需要让 Lighttpd 支持 ASP.NET,Linux 下要部署一个 ASP.NET 服务器,Mono 这个 .NET 在 Linux 下的实现是必不可少的。我们首先直接用 Pacman 安装 Mono,至于 Mono 的 FastCGI 支持需要从 SVN 下载回来编译安装,所以我们同时也安装一些必需的工具。
pacman -S mono svn automake autoconf libtool
然后我们随便建立一个目录,进入后运行
svn co http://mono-soc-2007.googlecode.com/svn/trunk/brian/FastCgi/ fastcgi-mono-server
源代码下载回来后进入 fastcgi-mono-server 目录打开 configure 文件,把第2387行注释掉,然后运行
./autogen.sh --prefix=/usr && make && make install
到这里,Mono 的 FastCGI 功能已经安装完成,剩下的就是继续配置 Lighttpd 了,打开 /etc/lighttpd/lighttpd.conf 文件,把昨天修改过的地方稍微修改一下就可以了
fastcgi.server = (
    ".php" => ("localhost" => ("socket" => "/tmp/php-fastcgi.socket","bin-path" => "/usr/bin/php-cgi")),
    ".aspx" => ("localhost" => ("socket" => "/tmp/fastcgi-mono-server", "bin-path" => "/usr/bin/fastcgi-mono-server2", "bin-environment" => ("MONO_SHARED_DIR" => "/tmp/")))
)
fastcgi.map-extensions = (".asmx" => ".aspx", ".ashx" => ".aspx", ".asax" => ".aspx", ".ascx" => ".aspx", ".soap" => ".aspx", ".rem" => ".aspx", ".axd" => ".aspx", ".cs" => ".aspx", ".config" => ".aspx", ".dll" => ".aspx")
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/75232/showart_2043913.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2