首页 > 系统 > Linux >

CentOS 6.0 安装 MONO 2.10.6

2011-11-06

1.更新系统yum update2.安装必要的相关库yum install gcc gcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif-devel giflib-devel libX11-dev...

1.更新系统

yum update

2.安装必要的相关库

yum install gcc gcc-c++ bison pkgconfig glib2-devel gettext make libpng-devel libjpeg-devel libtiff-devel libexif-devel giflib-devel libX11-devel freetype-devel fontconfig-devel cairo-devel httpd httpd-devel

3.安装libgdiplus

cd /usr/local/src/

wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2

tar -jxvf libgdiplus-2.10.tar.bz2

cd libgdiplus-2.10

./configure --prefix=/opt/mono

make

make install

echo "/opt/mono/lib" > /etc/ld.so.conf.d/mono.conf

ldconfig

4.安装mono

cd /usr/local/src/

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

tar -jxvf mono-2.10.6.tar.bz2

cd mono-2.10.6

./configure --prefix=/opt/mono

make

漫长的等待.......

make install

echo export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH>>~/.bash_profile

echo export LD_LIBRARY_PATH=/opt/mono/lib:$LD_LIBRARY_PATH>>~/.bash_profile

echo export PATH=/opt/mono/bin:$PATH>>~/.bash_profile

source ~/.bash_profile

输入mono -V 如有mono版本信息,则安装成功.

5.安装mono xsp-2.10

cd /usr/local/src/

wget http://download.mono-project.com/sources/xsp/xsp-2.10.tar.bz2

tar jxvf xsp-2.10.tar.bz2

cd xsp-2.10

./configure -prefix=/opt/mono

make www.2cto.com

make install

6.安装mod_mono-2.10

cd /usr/local/src/

wget http://download.mono-project.com/sources/mod_mono/mod_mono-2.10.tar.bz2

tar jxvf mod_mono-2.10.tar.bz2

cd mod_mono-2.10

./configure -prefix=/opt/mono

make;

make install

测试是否能够执行aspx:

在/var/www/html/目录下建一个test.aspx页面,内容为

<%="Hello World!"%>

通过wget http://localhost/test.aspx来下载该页面的内容。

摘自:aquila

相关文章
最新文章
热点推荐