Update 10/4/2011 – I’m starting to consolidate the major version posts. This script refers to 2.10.1; however, it installs 2.10 latest. Refer to the current 2.10 post for more info.
I just updated the bash install script for Mono 2.10. Thanks to @Marv for the Ubuntu script and heads up that 2.10 was released. This script is mainly intended for use with linux/apache web servers. It will install Mono, GTK, OpenGDI, XSP, and Mod_Mono. For Mono Develop, read through the Building Mono Develop page [mono-project.com], which will require a few additional packages not included in this script.
To install for Ubuntu:
wget --no-check-certificate https://github.com/nathanb/iws-snippets/raw/master/mono-install-scripts/ubuntu/install_mono-2.10.sh chmod 755 install_mono-2.10.sh ./install_mono-2.10.sh
To install for Fedora:
yum install wget wget --no-check-certificate https://github.com/nathanb/iws-snippets/raw/master/mono-install-scripts/fedora/install_mono-2.10.sh chmod 755 install_mono-2.10.sh ./install_mono-2.10.sh
Again, if setting up a web server, be sure to set the VirtualHost environment up correctly with PATH & LD_LIBRARY_PATH. (here, IOMAP is optional) See configuring virtual hosts. The following line should be included in your VirtualHost configuration.
MonoSetEnv site_name MONO_IOMAP=all;PATH=/opt/mono-2.10/bin:$PATH;LD_LIBRARY_PATH=/opt/mono-2.10/lib:$LD_LIBRARY_PATH;
Update – March 15, 2011
I’m refactoring some stuff, so bare with me. Today I’m introducing a totally re-written script that will hopefully make it easier to adapt to updates in the future. So far, I’ve treated these bash scripts like I do Windows batch files. But I took some time and tried to learn a little more about writing bash scripts. The new scripts will stop if any errors are encountered. This is good and bad. Good because now you know something went wrong, and the errors are much easier to find. Bad (maybe) because now you know something might not have worked. Anyway, I hope the changes will help everyone.
I’ve changed all the prefixes to use the major/minor version. So 2.10.1, 2.10.2 etc, will use prefix /opt/mono-2.10. You’ll always have the option to change that if you wish to use a different prefix. There’s a single variable in the beginning of the script that sets the prefix.
Finally, there does seem to be a problem at the end of installing xsp. However, everything seems to go in okay.
UPDATE – March 8, 2011
Mono 2.10.1 was released Feb 25th. I updated the install script for 2.10 to use the Mono 2.10.1 package. (That was the only package updated in this version). I’ve also included an experimental upgrade script for 2.10 to 2.10.1 here. (fedora vs ubuntu use the same script). Download it to the same location of your script for 2.10 and run it. It will uninstall just mono-2.10 and then download, compile, and re-install the new mono-2.10.1.