Install Mono and Monodevelop on CentOS 6.2 and RedHat 5/6

[Application Development]
[Linux]
[Mono]


After spending a couple hours trying to install Mono and Monodevelop by compiling from source to my target kernel without success, I finally found an easy way to successfully install Mono on CentOS 6.2. The trick is to use the MostlyLinux 6 repository.

MostlyLinux has many applications for both CentOS and RedHat Linux distributions including the latest versions of Mono (2.10.5) and Monodevelop (2.4.2). To install the pertinent applications from this repository, you just need to perform the following steps:

1) Open your Terminal window

2) Create the mostlinux repo file on file /etc/yum.repos.d through the command:

sudo vi /etc/yum.repos.d/mostlylinux.repo

3) Activate Vi's insert mode (ESC + i) and paste the following lines on the body of the mostlylinux.repo file:

[mostlylinux]
name=MostlyLinux
baseurl=http://mostlylinux.com/6/$basearch/os
enabled=1
gpgcheck=1
gpgkey=http://mostlylinux.com/6/RPM-GPG-KEY-mostlylinux

4) Save your file by pressing (ESC + :wq + <enter>)

5) To install Mono use the command:

sudo yum install -y mono-devel

6) To install Monodevelop use the command:

sudo yum install -y monodevelop


That's it. That's all you need to get the latest versions of Mono and Monodevelop running on your CentOS 6.2 distribution.