Installing C#, Mono(.NET) & MonoDevelop in Ubuntu Dapper Drake 6.06
Installing the complete Mono environment, including the runtime, the compiler and the development environment(MonoDevelop), is no more difficult in Ubuntu 6.06 than it was in Ubuntu 5.10.(The procedure for installing Mono for Kubuntu 6.06 is also similar, but GTK and related packages are needed to install the MonoDevelop IDE, which will be a big download if GNOME is not already installed.) After adding Multiverse and the Universe repositories to the Ubuntu source list, run the following commands in a shell(or use Synaptic/Adept Package Managers):
Except ‘mono’ all other packages are optional. mono-gmcs is C# 2.0 compiler(By default, mono-mcs C# 1.0 compiler is installed). MonoDevelop is a GUI development environment for Mono development(primarily). The above command will also install the Mono documentation manual(monodoc-manual). For a standalone Mono documentation browser, install monodoc-browser. If you prefer to read the documentation in a web browser, then install monodoc-http(which needs mono-xsp):
In the above command, monodoc package automatically installs monodoc-browser. Now you can view Mono documentation either in the stand-alone browser or in the web browser, by selecting the appropriate menu item from the GNOME/KDE menu:

Click the Monodoc(Documentation Browser) to browse through various help topics on Mono development:

You can install many other Mono based development manuals too, like Mono iPod manual, Mono njb manual(njb is a library used to talk to Creative MP3 Players etc), Mono NUnit manual etc.
Search for more documentation packages using ’sudo apt-cache search mono | grep manual’ command or using Synaptic/Adept Package Manager.
The following related tools are also available in the repositories:
monodevelop-java: To develop Java applications in MonoDevelop. Needs Java to be installed.
monodevelop-nunit: NUnit support in MonoDevelop. Strongly recommended.
monodevelop-versioncontrol: Only subversion is supported(no CVS).
mono-xsp is a standalone webserver that can be used to run ASP.NET 1.0 & 1.1 applications. mono-xsp2 runs ASP.NET 2.0 applications.
If you would rather host the ASP.NET applications through Apache webserver, then you need mono-apache-server package. Note:
mono-apache-server + libapache-mod-mono –> Apache 1.3
mono-apache-server + libapache2-mod-mono –> Apache 2.0
Similarly, mono-apache-server2 is for ASP.NET 2.0.
This will automatically select the mono-apache-server2 package. Remember that this will also install Apache server and related packages if they are not already installed. The next post will be about creating a sample Mono program using the MonoDevelop development environment.
Related Posts:
Readers who viewed this page, also viewed:
- Spice up GNOME Desktop Using gDesklets(aka SuperKaramba in KDE)
- Writing Your First Program With Mono And MonoDevelop
- Finally Got 3D Desktop Effects in My Ubuntu Gutsy (ATI Hardware)
- Installing C#/Mono(.NET)/MonoDevelop/XSP in Ubuntu Gutsy Gibbon(7.10)
- Create ASP.NET 1.0 & 2.0 Applications On GNU/Linux and Windows Using Mono XSP
[...] Installing the complete Mono environment, including the runtime, the compiler and the development environment(MonoDevelop), is no more difficult in Ubuntu 6.06 than it was in Ubuntu 5.10. [...]
QuotePingback by zean.no-ip.info » Installing C#, Mono(.NET) & MonoDevelop in Ubuntu Dapper Drake 6.06 — June 10, 2006 @ 11:07 am
Thanks. I’ve been thinking about trying Mono and will probably give this a try.
QuoteComment by Marc — June 11, 2006 @ 2:18 pm
You might be knowing it that a lot of cool applications for GNOME are being created in Mono these days. Some of my favourite ones(apart from Monodevelop) are:
A more comprehensive list is available on Wikipedia Mono page.
QuoteComment by tabrez — June 13, 2006 @ 2:14 pm
Thanks for the instructions, only one snag, when we do the etc/init.d/apache2 restart it failes with the error; “apache2: could not open document config file /etc/mono-server/mono-server-hosts.conf”. The answer is obvious, the apt-get install has put the mono server in a sub dir called /ect/mono-server2/.
QuoteMy questions is, where do I change the call to that .conf file. I have looked in httpd.conf and apache2.conf and there is no referance to this file in either locations??
Thanks again.
Comment by Ben — June 19, 2006 @ 4:54 am
Using an application called mc (apt-get install mc), I was able to look inside every file on my computer and found the referance, it was here; /etc/apache2/mods-avliable/mod-mono.conf
The sad thing was that the correct line was commented out, so it was a quick, but time consuming fix.
However, having done that, and restarting apache2, I still can not display or serve aspx pages. Looks like its back to Google and see whats missing.
Thanks for this tutorial, its a good start (I think).
Ben.
QuoteComment by Ben — June 19, 2006 @ 9:03 am
I plan to post two articles on creating 1. the first Mono application and 2. the first ASP.NET application in the near future.Maybe that will be helpful.
Come back and share with us what you learn in the meanwhile by googling and from the forums.
QuoteComment by tabrez — June 21, 2006 @ 9:55 am
I have spent the past 2 days looking into why it would not work. I have pretty much come up blank. It seems that for this years versions, it should just apt-get install and work.
The error I get is that there is a missing .dll in the /tmp/ directory. The dll is some number that keeps changing.
Here are some of the web sites that I have looked at; (They are not all the sites, just some of the scores (~100) that I have looked at in the last 2 days.)
http://www.mono-project.com/Mod_mono This site seems to imply that its pretty straight forward to get working. The interesting thing is that what they tell you to put in the httpd.conf is a little flawed as some of it is put in the /etc/apache2/mods-avliable/mod-mono.conf file. If you do put it in both, apache2 is not happy. Also, they claim that “a bunch of sample ASP.NET pages and web services were installed too.”. Well, they are not. So, I tried putting the path in that pointed to my project, it changed the error, but still did not work.
http://lists.alioth.debian.org/pipermail/pkg-mono-devel/2005-February/000369.html This site has some helpful information about permissions and mod-mono.
mod_mono apache2 configuration Really hard to read though, but some very helpful information, again, though, its dated and so Im not sure it applies to 2006’s version of things.
http://www.apacheworld.org/modmono/ Again, old, but really good helpful stuff to give you some background to what you are trying to do and how it might work.
http://lists.ximian.com/archives/public/mono-list/2004-May/020728.html Long read, but fantastic stuff.
http://www.novell.com/coolsolutions/feature/11205.html Its 2004 stuff, but fits in with what you have read.
http://www.go-mono.com/archive/xsp-0.10.html Nice and to the point, but yet again, its old.
So, they are some of the better pages I found. The reason I put them here is because this page you are reading is about the only uptodate one I could find on how to install this package in Ubuntu, so this background information needs to be here, in one place.
I was about to give up and reformat the hdd and install windows and IIS when a friend asked me if I had tried a different version of Linux. I was running a fresh install of Edubuntu (dapper), we both agreed that it should not make any difference, but it was worth a go.
I installed Kubuntu 6.06 (dapper) and repeated this web page instructions and it pretty much works now.
No errors, the page is served, but its all mangled, all the text is squashed into one line, the image is missing and its tag is displayed instead.
Close, much closer, but its hard to say where to go from here. We are using .NET 1.1 framework, so I have been careful to follow this HowTo for the 1.1 version of mod-mono.
I hope this this information will both help someone else, and in a few days will generate some help for us here (if the boss knew how much time I had spent on this, he would freak!)
Thanks.
Ben.
QuoteComment by ben — June 23, 2006 @ 3:56 am
I was in a slight brain fog when I said I had it working. We don’t, and never have.
What I was looking at was my browser trying to display the contents of the file, not the http://localhost version of the file.
What we get now is an offer to display the file, or save it to disk, if we display, we get another offer to display or save to disk.
Looking at the apache2 log, we see the following;
[Fri Jun 30 15:55:22 2006] [notice] caught SIGTERM, shutting down
[Fri Jun 30 15:55:23 2006] [notice] Apache/2.0.55 (Ubuntu) mod_mono/1.1.10 configured — resuming normal operations
Another mod-mono-server with the same arguments is already running.
I can not find where the other server is started from.
I’m sorry to say that we gave up. After a week of full time working on the problem, I simply ran out of time. I loaded WindowsXP and started IIS, after registering the dll we needed, it worked. Total time, about 40 minutes.
I will continue to monitor this web page from time to time and look at getting mod-mono going again in the future when its clear that things have changed, but for now, the apt-get install method is not working for me.
Thanks for your time.
Ben
QuoteComment by Ben — June 30, 2006 @ 11:44 am
John on November 3, 2006 at 4:53 pm said:
I have exactly the same problem :(
QuoteComment by John — November 3, 2006 @ 4:53 pm
[...] Probably not the most optimal setup, but I couldn't find much on how to do it. If you are trying to do this I hope this at least got you off to a start. Most of this was pieced together from the following sites: http://beans.seartipy.com/ http://www.fedoraforum.org http://ubuntuguide.org/ http://www.odetocode.com/ [...]
QuotePingback by Random Technology » Blog Archive » Howto Setup C# For Web Development On Ubuntu — February 5, 2007 @ 9:33 am
[...] sh# sudo apt-get install mono-apache-server2 libapache2-mod-mono ASP .NET on unix [...]
QuotePingback by mono-apache-server2 is for ASP.NET 2.0. — September 25, 2007 @ 4:47 pm
[...] Installing Mono & MonoDevelop in Ubuntu 6.06 [...]
QuotePingback by Installing C#/Mono(.NET)/MonoDevelop/XSP in Ubuntu Gutsy Gibbon(7.10) — October 31, 2007 @ 12:33 pm