原文链接:http://www.ienablemuch.com/2010/10/aspnet-on-mac-os-x-snow-leopard-at-one.html
Enable Apache first by ticking the checkbox for Web Sharing(System Preferences > Sharing > Web Sharing)
Type 127.0.0.1 in browser's address bar, then it should show:
Download then install this: http://ftp.novell.com/pub/mono/archive/2.8/macos-10-x86/10/MonoFramework-2.8_10.macos10.novell.x86.dmg
Verify on Terminal if you have installed Mono...
mono -V...should show this:
Mono JIT compiler version 2.8 (tarball Tue Oct 5 14:16:19 MDT 2010) Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com TLS: normal SIGSEGV: normal Notification: Thread + polling Architecture: x86 Disabled: none Misc: debugger softdebug LLVM: supported, not enabled. GC: Included Boehm (with typed GC)Paste this in your terminal(the next swoop will still have the effect of sudo(i.e. no need to re-enter password)) :
sudo mv /Library/WebServer/Documents/index.html.en /Library/WebServer/Documents/x_index.html.enAnd this(so that makes it two swoop ;-)) :
mkdir ~/swoop cd ~/swoop sudo ln -s /Library/Frameworks/Mono.framework/Commands/pkg-config /usr/bin/pkg-config curl -O http://ftp.novell.com/pub/mono/sources/mod_mono/mod_mono-2.8.tar.bz2 tar xzf mod_mono-2.8.tar.bz2 cd mod_mono-2.8 ./configure make sudo make install sudo sh -c "echo '\n\nInclude /etc/apache2/mod_mono.conf' >> /etc/apache2/httpd.conf" echo "<center><img src='PoweredByMacOSXLarge.gif'><br><% int a = 7 * 6;%><%=a%> <%=new System.Random().Next()%></center>" > /Library/WebServer/Documents/index.aspx sudo /usr/sbin/apachectl restart echo 'Done'
Then refresh the 127.0.0.1 in your browser, you shall be able to see the the answer to life, the universe and everything