2.编译安装mono 2.0

3.安装完毕后可以通过“ -V”查看mono版本



#yum groupinstall Mono
But I noticed the version of Mono I installed is 1.2.4, seems that the lastversion of mono ( 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-,
#wget http://ftp.novell.com/pub/mono/sources/mono/mono-

3.Extract the downloaded file,
# tar jxvf mono-

4.Change to the newly created directory,
# cd mono-

5.I put my built packages in /opt so, run the following command to build mono,
# ./configure –prefix=/opt/mono; make; make install
6.Update ~/.bash_profile,

#echo export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH>>~/.bash_profile
#echo export PATH=/opt/mono/bin:$PATH>>~/.bash_profile
#source ~/.bash_profile

7. Test it,
#mono -V
and I got the output:

Mono JIT compiler version (tarball Thu Oct 22 06:42:24 MSD 2009)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
GC: Included Boehm (with typed GC)
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none

Great, I got it.
I think I’d better put all script I used in one place,

mkdir ~/software
yum install gcc bison pkgconfig glib2-devel gettext make
wget http://ftp.novell.com/pub/mono/sources/mono/mono-
tar jxvf mono-
cd 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
source ~/.bash_profile
mono -V
cd ..
rm -rf mono-

Mono Home Page
[HOWTO] Install Mono 2.4 on CentOS 5.3

fastcgi-mono-server2 /socket=tcp:9000 &

重启nginx:kill -HUP cat /usr/local/nginx/logs/nginx.pid