views:

178

answers:

1

I'm a Linux neophyte and can't figure out how to install the Mono 2.6.7 runtime on CentOS 5.5 using yum.

I know how to build Mono from the source. However, according to this page it is possible to install the binaries directly. I'd prefer to install the binaries to avoid having to install all the devel pre-requisites on a server with little disk space.

http://www.mono-project.com/GettingStartedWithMonoVS

Am I supposed to add a new repo description to Yum? I tried doing that but I must have done it wrong because "yum list mono-core" still says the old version (1.2.4-2.el5.centos).

And, why on the release server are the .rpm's called "mono-addon-"... it's a bit confusing. It sounds like the .rpm's are an add-on to mono. I guess they mean they are an "add-on" to the server?

thanks!

+2  A: 

I figured it out.

Create a new repo config 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 the yum cache to be on the safe side

yum clean all

Install the Mono server stack

yum install monotools-addon-server

The installed binaries will end up in "/opt/novell/mono/bin".

You should issue the following command to set up your shell environment so that it finds mono, mcs and the other mono tools

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

Verify the 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 the Mono environment to be permanent you can issue the following command.

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

Happy Mono'ing!!!

octonion