下载编译环境:
yum install gcc bison pkgconfig glib2-devel gettext make httpd-devel gcc-c++ libstdc++-devel
下载并解压源代码:
wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.6.3.tar.bz2
wget http://ftp.novell.com/pub/mono/sources/mod_mono/mod_mono-2.6.3.tar.bz2
wget http://ftp.novell.com/pub/mono/sources/xsp/xsp-2.6.3.tar.bz2
tar -jxvf mono-2.6.3.tar.bz2
tar -jxvf xsp-2.6.3.tar.bz2
tar -jxvf mod_mono-2.6.3.tar.bz2
安装mono环境:
cd /root/mydir/mono-2.6.3
./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
安装xsp:
cd /root/mydir/xsp-2.6.3
./configure --prefix=/opt/mono; make ; make install
安装mod_mono:
先用find / -iname apr*config命令查找出“--with-apr-config=/usr/bin/apr-1-config”(不知道--with-apr-config=/usr/bin/apr-1-config有什么用,好像不要也可以,麻烦知道的告诉一下小弟)
再执行下面的命令:
cd /root/mydir/mod_mono-2.6.3
./configure --prefix=/opt/mono --with-mono-prefix=/opt/mono --with-apr-config=/usr/bin/apr-1-config; make ; make install
cp /etc/httpd/conf.d/ /etc/httpd/conf/mod_mono.conf
selinux阻止了httpd对mod-mono-server的访问,所以执行下面的语句:
setsebool -P httpd_disable_trans=1
重启httpd服务器:
service httpd restart
在防火墙中开启80端口,允许同一个Lan的其他机器访问:
方法1.在不使用图形界面工具的时候,通过关闭防火墙来实现允许开放80端口
service iptables stop
(PS:我尝试过下面的方法,
vi /etc/sysconfig/iptables
添加:-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
service iptables restart
虽然在iptables -L中看到http
但无法从其他机器访问该服务器。
如果有谁成功,请告知小弟):
方法2.在安装有图形界面工具的情况下,用startx进入图形界面,用“Security Level and Firewall”开启80端口。
安装libgdiplus(xsp的测试页面中,有很多都需要libgdiplus):
yum install httpd build-essential gcc bzip bison pkgconfig glib-devel \
glib2-devel httpd-devel libpng-devel libX11-devel freetype fontconfig \
pango-devel ruby ruby-rdoc gtkhtml38-devel wget
wget http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.6.2.tar.bz2
tar -jxvf libgdiplus-2.6.2.tar.bz2
cd /root/mydir/libgdiplus-2.6.2
./configure
make ; make install
echo export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH ~/.bash_profile
source ~/.bash_profile
vi /opt/mono/etc/mono/config
添加节点:<dllmap dll="gdiplus.dll" target="/usr/lib/libgdiplus.so.0" />
否则会出现DllNotFoundException的异常。
测试:
一、测试mono
a.运行mono -V输出:
Mono JIT compiler version 2.6.3 (tarball Fri Apr 2 06:13:46 CST 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. http://www.mono-project.com/
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
b.运行mono-test-install输出:
Active Mono: /opt/mono/bin/mono
Your have a working System.Drawing setup
Your file system watcher is: System.IO.InotifyWatcher
二、测试Asp.Net服务器
a.测试是否能够执行aspx:
在/var/www/html/目录下建一个test.aspx页面,内容为
<%="Hello World!"%>
通过wget http://localhost/test.aspx来下载该页面的内容。
b.测试同一个Lan下其他机器能否访问:
用其他机器的浏览器打开http://ip/test.aspx
c.跑xsp自带的测试程序(多点几个页面,查看是否会出现gdiplus.dll DllNotFoundException的一场):
1.修改Apache的配置,开放防火墙8080端口
Listen 8080
NameVirtualHost *:8080
<VirtualHost *:8080>
ServerAdmin hlfstephen@gmail.com
DocumentRoot /var/www/test/
ServerName local.mydomain.com
ErrorLog logs/local.mydomain.com-error_log
CustomLog logs/local.mydomain.com common
</VirtualHost>
2.复制/opt/mono/lib/xsp/test目录到var/www/下
3.service httpd restart
4.用浏览器打开http://ip:8080/
yum install gcc bison pkgconfig glib2-devel gettext make httpd-devel gcc-c++ libstdc++-devel
下载并解压源代码:
wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.6.3.tar.bz2
wget http://ftp.novell.com/pub/mono/sources/mod_mono/mod_mono-2.6.3.tar.bz2
wget http://ftp.novell.com/pub/mono/sources/xsp/xsp-2.6.3.tar.bz2
tar -jxvf mono-2.6.3.tar.bz2
tar -jxvf xsp-2.6.3.tar.bz2
tar -jxvf mod_mono-2.6.3.tar.bz2
安装mono环境:
cd /root/mydir/mono-2.6.3
./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
安装xsp:
cd /root/mydir/xsp-2.6.3
./configure --prefix=/opt/mono; make ; make install
安装mod_mono:
先用find / -iname apr*config命令查找出“--with-apr-config=/usr/bin/apr-1-config”(不知道--with-apr-config=/usr/bin/apr-1-config有什么用,好像不要也可以,麻烦知道的告诉一下小弟)
再执行下面的命令:
cd /root/mydir/mod_mono-2.6.3
./configure --prefix=/opt/mono --with-mono-prefix=/opt/mono --with-apr-config=/usr/bin/apr-1-config; make ; make install
cp /etc/httpd/conf.d/ /etc/httpd/conf/mod_mono.conf
selinux阻止了httpd对mod-mono-server的访问,所以执行下面的语句:
setsebool -P httpd_disable_trans=1
重启httpd服务器:
service httpd restart
在防火墙中开启80端口,允许同一个Lan的其他机器访问:
方法1.在不使用图形界面工具的时候,通过关闭防火墙来实现允许开放80端口
service iptables stop
(PS:我尝试过下面的方法,
vi /etc/sysconfig/iptables
添加:-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
service iptables restart
虽然在iptables -L中看到http
但无法从其他机器访问该服务器。
如果有谁成功,请告知小弟):
方法2.在安装有图形界面工具的情况下,用startx进入图形界面,用“Security Level and Firewall”开启80端口。
安装libgdiplus(xsp的测试页面中,有很多都需要libgdiplus):
yum install httpd build-essential gcc bzip bison pkgconfig glib-devel \
glib2-devel httpd-devel libpng-devel libX11-devel freetype fontconfig \
pango-devel ruby ruby-rdoc gtkhtml38-devel wget
wget http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.6.2.tar.bz2
tar -jxvf libgdiplus-2.6.2.tar.bz2
cd /root/mydir/libgdiplus-2.6.2
./configure
make ; make install
echo export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH ~/.bash_profile
source ~/.bash_profile
vi /opt/mono/etc/mono/config
添加节点:<dllmap dll="gdiplus.dll" target="/usr/lib/libgdiplus.so.0" />
否则会出现DllNotFoundException的异常。
测试:
一、测试mono
a.运行mono -V输出:
Mono JIT compiler version 2.6.3 (tarball Fri Apr 2 06:13:46 CST 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors. http://www.mono-project.com/
TLS: __thread
GC: Included Boehm (with typed GC and Parallel Mark)
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
b.运行mono-test-install输出:
Active Mono: /opt/mono/bin/mono
Your have a working System.Drawing setup
Your file system watcher is: System.IO.InotifyWatcher
二、测试Asp.Net服务器
a.测试是否能够执行aspx:
在/var/www/html/目录下建一个test.aspx页面,内容为
<%="Hello World!"%>
通过wget http://localhost/test.aspx来下载该页面的内容。
b.测试同一个Lan下其他机器能否访问:
用其他机器的浏览器打开http://ip/test.aspx
c.跑xsp自带的测试程序(多点几个页面,查看是否会出现gdiplus.dll DllNotFoundException的一场):
1.修改Apache的配置,开放防火墙8080端口
Listen 8080
NameVirtualHost *:8080
<VirtualHost *:8080>
ServerAdmin hlfstephen@gmail.com
DocumentRoot /var/www/test/
ServerName local.mydomain.com
ErrorLog logs/local.mydomain.com-error_log
CustomLog logs/local.mydomain.com common
</VirtualHost>
2.复制/opt/mono/lib/xsp/test目录到var/www/下
3.service httpd restart
4.用浏览器打开http://ip:8080/
参考:
http://blog.rubypdf.com/2009/10/23/how-to-install-mono-2-4-2-3-on-centos-5/
http://blog.rubypdf.com/2009/10/23/how-to-install-xsp-and-integrate-xsp-with-apache-2-under-centos-5/
http://blog.bennyland.com/2010/02/06/serving-asp-net-pages-in-apache-on-centos-5/
http://mingster.com/site/?q=content/mono-2x-centos-5
http://mono-project.com/DllNotFoundException
http://mono-project.com/Config_DllMap
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
更新日志
2024年11月25日
2024年11月25日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]