1、安装必要的库

# yum install gccgcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devellibtiff-devel libexif-devel giflib-devel libX11-devel freetype-develfontconfig-devel cairo-devel httpdhttpd-devel

2、安装libgdiplus

# wget http://download.mono-project.com/sources/libgdiplus-1.1/libgdiplus-2.10.9.tar.bz2

# tar -jxvflibgdiplus-2.10.9.tar.bz2

# cdlibgdiplus-2.10.9

#./configure --prefix=/usr/local/mono

#make && make install

# echo "/usr/local/mono/lib/" >/etc/ld.so.conf.d/mono.conf

# ldconfig

3、安装mono

# wget http://download.mono-project.com/sources/mono/mono-3.4.0.tar.bz2

# tar -jxfmono-3.4.0.tar.bz2

# cd mono-3.4.0

#./configure --prefix=/usr/local/mono/

#make && make install

# echo exportPKG_CONFIG_PATH=/usr/local/mono/lib/pkgconfig:$PKG_CONFIG_PATH >>~/.bash_profile

# echo exportLD_LIBRARY_PATH=/usr/local/mono/lib:$LD_LIBRARY_PATH >> ~/.bash_profile

# echo exportPATH=/usr/local/mono/bin:$PATH >> ~/.bash_profile

# source~/.bash_profile

# mono -V 有版本信息,则安装成功。

4、安装jexus

# wget http://www.linuxdot.net/down/jexus-5.5.2.tar.gz

# tar -zxfjexus-5.5.2.tar.gz

# mv jexus-5.5.2/usr/local/jexus

# cd/usr/local/jexus/

#./install

Installed/usr/jexus/jxAspx2.dll into the gac (/usr/local/mono/lib/mono/gac)

Installed/usr/jexus/jxAspx.dll into the gac (/usr/local/mono/lib/mono/gac)

Installed/usr/jexus/jxHost2.dll into the gac (/usr/local/mono/lib/mono/gac)

Installed/usr/jexus/jxHost.dll into the gac (/usr/local/mono/lib/mono/gac)

OK,Jexus web server has been installed to '/usr/jexus'.

# /usr/jexus/jwsstart

Starting ... OK

4、测试

# mkdir/var/www/default

这个是jexus默认web根目录,/usr/jexus/siteconf/default这个文件中定义。

# vim/var/www/default/index.aspx

<%="hello-monoin linux"%>

# /usr/jexus/jwsrestart