I am a .NET developer, but for the need of my job, I am also familiar with CentOS 5 and OpenVZ. I have installed Mono on my Windows XP environment before, and want to have a try Mono under CentOS 5.
This time I use a CentOS 5.2 VPS(a clean VPS I just created)to install the last version Mono(v184.108.40.206).
First of all, I tried the easiest way to install Mono,
#yum groupinstall Mono
But I noticed the version of Mono I installed is 1.2.4, seems that the lastversion of mono (220.127.116.11) is not in the CentOS package repositories.
Then I tried to find the last version distribution from Mono Home page and google, but no result, So I had to download the source code and compile it all by my self.
After some attempts, I got the following steps to compile and install the last version Mono on my CentOS 5.2 VPS host,
1.prepare the compile environment,
# yum install gcc bison pkgconfig glib2-devel gettext make
2.Go to this page and download the last version Mono(in my case, mono-18.104.22.168.tar.bz2),
3.Extract the downloaded file,
# tar jxvf mono-22.214.171.124.tar.bz2
4.Change to the newly created directory,
# cd mono-126.96.36.199
5.I put my built packages in /opt so, run the following command to build mono,
# ./configure â€“prefix=/opt/mono; make; make install
#echo export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH>>~/.bash_profile
#echo export PATH=/opt/mono/bin:$PATH>>~/.bash_profile
7. Test it,
and I got the output:
Mono JIT compiler version 188.8.131.52 (tarball Thu Oct 22 06:42:24 MSD 2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
GC: Included Boehm (with typed GC)
Great, I got it.
I think I’d better put all script I used in one place,
yum install gcc bison pkgconfig glib2-devel gettext make
tar jxvf mono-184.108.40.206.tar.bz2
./configure â€“prefix=/opt/mono; make; make install
echo export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH>>~/.bash_profile
echo export PATH=/opt/mono/bin:$PATH>>~/.bash_profile
rm -rf mono-220.127.116.11
Mono Home Page
[HOWTO] Install Mono 2.4 on CentOS 5.3
In the next article, I will introduce how to let Apache to serve ASP.NET applications under Linux, How to Install XSP and Integrate XSP With Apache 2 Under CentOS 5
7 thoughts on “How to Install Mono 18.104.22.168 on CentOS 5”
Thank you for useful information. My question is how can you now execute C# exe file with user interface that was before prepared in Windows XP? I have problem to do this in CentOS, however I do it in Ubuntu in simple way, exactly as it is written in the Mono instruction.
if your exe compiled with mono under windows XP, maybe you can run it on CentOS