On Monday, Mono 2.0 was released by the Mono Development team. This release has been in-progress for a couple of years and is a major step forward in the mission to run .Net on Linux and other platforms. If you check out the release notes you can see there's a bus load of new features supported; including Linq!
To make it as easy to use Mono 2.0 in Amazon EC2 cloud I have built a new version of the image I created with Mono 1.9.1 a couple of months ago.
Update: a Mono 2.2 AMI is available
The EC2 AMI and manifest path are:
ami-b627c3df nonhostile-mono2-i386/image.manifest.xml
Once you start this instance, you can browse to its public DNS name to see the XSP test sites.
This instance is intended to serve web applications or run console based applications or services; it does not have any kind of graphics interface.
Ingredients
This instance was made from:
- Amazon’s Fedora 8 base image (ami-2b5fba42 v1.07)
- Latest updates via yum
- Apache 2.2.6 installed via yum
- Apache and mod_mono are configured to serve the XSP 'test' files from the web site's root in /etc/httpd/conf/httpd.conf (at the bottom)
The following have been compiled and installed from the Mono 2.0 stable sources with the --prefix=/usr
- mono-2.0
- mono-basic-2.0
- mod_mono-2.0
- libgdiplus-2.0
- xsp-2.0
The sample ASP.Net files for 1.0 and 2.0 are installed at this root:
/usr/lib/xsp/test
The Apache config (/etc/httpd/conf/httpd.conf) file has been configured to serve an ASP.Net application from this location.
You can edit the Apache configuration file using vim. Use Ctrl-D in vim to page-scroll down.
vim /etc/httpd/conf/httpd.conf
# Set mono as the handler SetHandler mono # Configure a 'root' web application to run from root MonoApplications root "/:/usr/lib/xsp/test" MonoServerPath root /usr/bin/mod-mono-server2 <Location /> MonoSetServerAlias root </Location>Configuring your own ASP.Net applications
To serve your own ASP.Net applications from this instance, you need to store the files somewhere, for example, /mnt/MyApp, then modify the MonoApplications directive at the bottom of the Apache configuration file.
MonoApplications root "/:/mnt/MyApp"
Good luck and happy Mono developing!
Links
- Mono AMI: documentation at Amazon community directory
- Mono 2.0 Release Notes
- Mono: The Mono homestead sporting a new look
- mod_mono: Documentation on configuring mod_mono
- VIM Shortcuts: For help using vim
- Twitter: My twitter link if you want to keep in touch


