注意要安裝前要先了解系統是否有裝開發套件否則無法編譯
[root@luther]# cd /
[root@luther]# mkdir asp.net
[root@luther]# cd asp.net
[root@luther]# wget
http://ftp.novell.com/pub/mono/sources/mono/mono-2.0.1.tar.bz2[root@luther]# wget
http://ftp.novell.com/pub/mono/sources/xsp/xsp-2.0.tar.bz2[root@luther]# wget
http://ftp.novell.com/pub/mono/sources/mod_mono/mod_mono-2.0.tar.bz2[root@luther]# tar jvxf *.bz2
[root@luther]# cd mono-2.0.1
[root@luther]# ./configure --prefix=/asp.net/mono
[root@luther]# make ; make install
[root@luther]# cd ../xsp-2.0
[root@luther]# ./configure --prefix=/asp.net/mono
[root@luther]# make ; make install
[root@luther]# export PATH=/asp.net/mono/bin:$PATH
[root@luther]# cd ../mod_mono-2.0
[root@luther]# ./configure --prefix=/asp.net/mono \
--with-mono-prefix=/asp.net/mono \
--with-apr-config=/usr/bin/apr-config
[root@luther]# make ; make install
[root@luther]# vi /etc/httpd/conf/httpd.conf
附加下面代碼(參考)
<IfModule !mod_mono.c>
LoadModule mono_module /etc/httpd/modules/mod_mono.so
AddType application/x-asp-net .aspx
AddType application/x-asp-net .asmx
AddType application/x-asp-net .ashx
AddType application/x-asp-net .asax
AddType application/x-asp-net .ascx
AddType application/x-asp-net .soap
AddType application/x-asp-net .rem
AddType application/x-asp-net .axd
AddType application/x-asp-net .cs
AddType application/x-asp-net .config
AddType application/x-asp-net .Config
AddType application/x-asp-net .dll
AddType application/x-asp-net .asp
DirectoryIndex index.aspx
DirectoryIndex Default.aspx
DirectoryIndex default.aspx
</IfModule>
<VirtualHost 198.xxx.xxx.xxx:80>
DocumentRoot /home/httpd/aspx/html
ServerName aspx.yoursite.com
Alias /demo /asp.net/mono/lib/xsp/test
MonoApplications "/demo:/asp.net/mono/lib/xsp/test"
MonoServerPath /asp.net/mono/lib/mono/1.0/mod-mono-server.exe
<Directory /asp.net/mono/lib/xps/test>
SetHandler mono
</Directory>
</VirtualHost>
測試ASP.NET以下代碼
<html>
<body>
<% Response.Write("Hello World!"); %>
</body>
</html>
這裡找到的http://poormanstech.blogspot.com/2007/05/installing-mono.html
make uninstall 便是卸載命令。