Install Mono on Centos 5.5 with YUM

How to install Mono 2.6.7 CentOS 5.5 runtime using YUM ?

I know how to build Mono from the source. However, according to the Getting Started with Mono Tools page, you can directly install the binaries. I would prefer to install the binaries to avoid having to install all the development prerequisites on a server with little disk space.

Should I add a new repository description in YUM? I tried to do this, but I must have done it wrong because the "yum list mono-core" is still talking about the old version (1.2.4-2.el5.centos).

And why is .rpm called "mono-addon-" on the release server? This is a bit confusing. It seems that .rpm is a complement to Mono. I assume that they mean that they are "add-ons" on the server (?).

+41
install mono centos
Aug 18 '10 at 8:41
source share
2 answers

I get it.

Create a new repository configuration file

cd /etc/yum.repos.d vi mono.repo 

Add the following lines to the file

 [Mono] name=Mono Stack (RHEL_5) type=rpm-md baseurl=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/ gpgcheck=1 gpgkey=http://ftp.novell.com/pub/mono/download-stable/RHEL_5/repodata/repomd.xml.key enabled=1 

Update YUM Cache on Safe Side

 yum clean all 

Install Mono Server Stack

 yum install monotools-addon-server 

Installed binaries will go to "/ opt / novell / mono / bin".

You must run the following command to configure the shell environment so that it finds Mono, mcs, and other Mono tools

 source /opt/novell/mono/bin/mono-addon-environment.sh 

Check version

 mono --version Mono JIT compiler version 2.6.7 (tarball Mon Jul 19 18:28:58 UTC 2010) Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: Included Boehm (with typed GC and Parallel Mark) SIGSEGV: altstack Notifications: epoll Architecture: amd64 Disabled: none 

If you want Mono to be permanent, you can run the following command.

 cp /opt/novell/mono/bin/mono-addon-environment.sh /etc/profile.d 

Happy Mono'e !!!

+63
Aug 18 '10 at 9:51 on
source share

In addition to the octonion post , if, like me, you want to use Apache mod_mono, you need to make sure that you installed the correct version of mod_mono by running the following and it will get the correct option:

 yum install mod_mono-addon 

Don't just type yum install mod_mono . It can install mod_mono 1.2 from the CentOS special object repository, not what you really are after.

As a reference, I received the following error in /var/log/httpd/error_log when starting the wrong version of mod_mono:

Root directory:/
mod_mono and xsp have different versions. Expected "9", received 6 System.InvalidOperationException: mod_mono and xsp have different versions. Expected "9", got 6

This is a stupid but simple mistake if you are new to this, like me.

+5
May 16 '11 at 1:27
source share



All Articles