Debian – Upgrading the debian server to Wheezy just to install mono

.net-4.0debianinstallationmono

I'm looking to use mod-mono-server4 so that I can run .NET 4.0 apps on mono.

I'm currently running a debian server with squeeze with this mono version:

$ mono --version
Mono JIT compiler version 2.6.7 (Debian 2.6.7-5)

Which does not include mod-mono-server4.

According to http://mono-project.com/DistroPackages/Debian this is the latest version of mono I can have so it looks like I need to use the 'Testing' version on Wheezy to get version 2.10.8.1. So my question is, how do I upgrade to a testing version and is this not advised? My server currently has a few sites running on it and is not a test server by any means.

I'm assuming I will need to add some new or modify the current repositories in my /etc/apt/sources.list but will this affect other stuff installed on my server?

Best Answer

You can set pinning in /etc/apt/preferences like this:

Package: *
 Pin: release a=stable
 Pin-Priority: 700

Package: *
 Pin: release o=Debian,a=testing
 Pin-Priority: 300

Package: *
 Pin: release o=Debian
 Pin-Priority: -1

After that you can add testing repo to /etc/apt/sources.list and aptitude update.

Package pinning allows you to install selected packages and it's dependencies from testing, leaving rest of the system at stable.

Use aptitude -t testing install mono to set up testing version of the package.

You should be carefull when mixing different repos, since you can get broken combination of packages or end up with messed system.

Read this and this for more info

Related Topic