|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
网络操作命令:ifconfig、ip、ping、netstat、telnet、ftp、route、rloginrcp、finger、mail、nslookup
下载编译情况:
yuminstallgccbisonpkgconfigglib2-develgettextmakehttpd-develgcc-c++libstdc++-devel
下载并解压源代码:
wgethttp://ftp.novell.com/pub/mono/sources/mono/mono-2.6.3.tar.bz2
wgethttp://ftp.novell.com/pub/mono/sources/mod_mono/mod_mono-2.6.3.tar.bz2
wgethttp://ftp.novell.com/pub/mono/sources/xsp/xsp-2.6.3.tar.bz2
tar-jxvfmono-2.6.3.tar.bz2
tar-jxvfxsp-2.6.3.tar.bz2
tar-jxvfmod_mono-2.6.3.tar.bz2
安装mono情况:
cd/root/mydir/mono-2.6.3
./configure--prefix=/opt/mono;make;makeinstall
echoexportPKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH>>~/.bash_profile
echoexportPATH=/opt/mono/bin:$PATH>>~/.bash_profile
source~/.bash_profile
安装xsp:
cd/root/mydir/xsp-2.6.3
./configure--prefix=/opt/mono;make;makeinstall
安装mod_mono:
先用find/-inameapr*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;makeinstall
cp/etc/httpd/conf.d//etc/httpd/conf/mod_mono.conf
selinux制止了httpd对mod-mono-server的会见,以是实行上面的语句:
setsebool-Phttpd_disable_trans=1
重启httpd服务器:
servicehttpdrestart
在防火墙中开启80端口,同意统一个Lan的其他呆板会见:
办法1.在不利用图形界面工具的时分,经由过程封闭防火墙来完成同意开放80端口
serviceiptablesstop
(PS:我实验过上面的办法,
vi/etc/sysconfig/iptables
增加:-ARH-Firewall-1-INPUT-mstate--stateNEW-mtcp-ptcp--dport80-jACCEPT
serviceiptablesrestart
固然在iptables-L中看到http
但没法从其他呆板会见该服务器。
假如有谁乐成,请告诉小弟):
办法2.在安装有图形界面工具的情形下,用startx进进图形界面,用“SecurityLevelandFirewall”开启80端口。
安装libgdiplus(xsp的测试页面中,有良多都必要libgdiplus):
yuminstallhttpdbuild-essentialgccbzipbisonpkgconfigglib-devel
glib2-develhttpd-devellibpng-devellibX11-develfreetypefontconfig
pango-develrubyruby-rdocgtkhtml38-develwget
wgethttp://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.6.2.tar.bz2
tar-jxvflibgdiplus-2.6.2.tar.bz2
cd/root/mydir/libgdiplus-2.6.2
./configure
make;makeinstall
echoexportLD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH>>~/.bash_profile
source~/.bash_profile
vi/opt/mono/etc/mono/config
增加节点:<dllmapdll="gdiplus.dll"target="/usr/lib/libgdiplus.so.0"/>
不然会呈现DllNotFoundException的非常。
测试:
1、测试mono
a.运转mono-V输入:
MonoJITcompilerversion2.6.3(tarballFriApr206:13:46CST2010)
Copyright(C)2002-2010Novell,IncandContributors.http://www.mono-project.com/
TLS:__thread
GC:IncludedBoehm(withtypedGCandParallelMark)
SIGSEGV:altstack
Notifications:epoll
Architecture:x86
Disabled:none
b.运转mono-test-install输入:
ActiveMono:/opt/mono/bin/mono
YourhaveaworkingSystem.Drawingsetup
Yourfilesystemwatcheris:System.IO.InotifyWatcher
2、测试Asp.Net服务器
a.测试是不是可以实行aspx:
在/var/www/html/目次下建一个test.aspx页面,内容为
<%="HelloWorld!"%>
经由过程wgethttp://localhost/test.aspx来下载该页面的内容。
b.测试统一个Lan下其他呆板可否会见:
用其他呆板的扫瞄器翻开http://ip/test.aspx
c.跑xsp自带的测试程序(多点几个页面,检察是不是会呈现gdiplus.dllDllNotFoundException的一场):
1.修正Apache的设置,开放防火墙8080端口
Listen8080
NameVirtualHost*:8080
<VirtualHost*:8080>
ServerAdminhlfstephen@gmail.com
DocumentRoot/var/www/test/
ServerNamelocal.mydomain.com
ErrorLoglogs/local.mydomain.com-error_log
CustomLoglogs/local.mydomain.comcommon
</VirtualHost>
2.复制/opt/mono/lib/xsp/test目次到var/www/下
3.servicehttpdrestart
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
如果你想在以后的生涯中在软件行业工作的话,学习linux是一项基本技能,所以打从你打算学习linux那天起,放弃windows吧!因为它除了能给你带来片刻的娱乐,别无其他; |
|