Running Mono 2.10.2 on Dreamhost

Mono is an open source project that allows the development and deployment of .NET client and server applications on Linux, Solaris, Mac OS X, Windows, and Unix. Current version targeted to support .NET 4.0 (see Mono Compatibility for details ). In particular, it will allow ASP.NET, ASP.NET MVC, WCF to run and host.

About this document
This tutorial has been taken and translated from my blog post (rus). All the steps were tested on DreamHost VPS and clean Debian distro.

Basically it is a bunch of tips, which should make mono installation bit easier. It is not a one click installation, you will definitely have some issues during the process, which should be fixed manually.

By following these instruction, you should end up with local installation of mono without requiring the root privileges.

Compile
Mono (especially LibGdiPlus) has some dependencies to libraries which are outdated or missing in standard DreamHost VPS, therefore it is simpler to install them all into one place by making dedicated "all in one" environment.

There is a special script which takes all dependencies, compiles and put into one place mono-install.sh.

Don't run the script until you are unsure what exactly it does! You will definitely need to run it several times and make the changes in it (at least for LibGdiPlus - will be described later). It is also a good idea to increase memory limits of VPS during compilation.

Troubleshooting

 * Process is being killed by procwatch. You need to increase the memory for VPS
 * libgdiplus fails during the test. This is a known issue when there is no XServer installed (our case). After "./configure" remove "tests" from SUBDIRS and DIST_SUBDIRS variables in Makefile file.

Test
source [MONO_DIR]/mono-env mono -V mono-test-install