国产chinesehd精品酒店,邱淑贞aa极毛片,国产在线色视频,玖玖爱zh综合伊人久久

網(wǎng)站首頁(yè)
手機(jī)版

CentOS 5.1下跑Mono和Asp.net的實(shí)現(xiàn)方法分享

更新時(shí)間:2023-09-06 00:23:47作者:佚名

CentOS 5.1下跑Mono和Asp.net的實(shí)現(xiàn)方法分享

下載編譯環(huán)境:
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環(huán)境:
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有什么用,好像不要也可以,麻煩知道的告訴一下小弟)
再執(zhí)行下面的命令:
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對(duì)mod-mono-server的訪問(wèn),所以執(zhí)行下面的語(yǔ)句:
setsebool -P httpd_disable_trans=1

重啟httpd服務(wù)器:
service httpd restart

在防火墻中開(kāi)啟80端口,允許同一個(gè)Lan的其他機(jī)器訪問(wèn):
方法1.在不使用圖形界面工具的時(shí)候,通過(guò)關(guān)閉防火墻來(lái)實(shí)現(xiàn)允許開(kāi)放80端口
service iptables stop
(PS:我嘗試過(guò)下面的方法,
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
但無(wú)法從其他機(jī)器訪問(wèn)該服務(wù)器。
如果有誰(shuí)成功,請(qǐng)告知小弟):

方法2.在安裝有圖形界面工具的情況下,用startx進(jìn)入圖形界面,用“Security Level and Firewall”開(kāi)啟80端口。

安裝libgdiplus(xsp的測(cè)試頁(yè)面中,有很多都需要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
添加節(jié)點(diǎn):<dllmap dll="gdiplus.dll" target="/usr/lib/libgdiplus.so.0" />
否則會(huì)出現(xiàn)DllNotFoundException的異常。

測(cè)試:
一、測(cè)試mono
a.運(yùn)行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.運(yùn)行mono-test-install輸出:
Active Mono: /opt/mono/bin/mono
Your have a working System.Drawing setup
Your file system watcher is: System.IO.InotifyWatcher

二、測(cè)試Asp.Net服務(wù)器
a.測(cè)試是否能夠執(zhí)行aspx:
在/var/www/html/目錄下建一個(gè)test.aspx頁(yè)面,內(nèi)容為
<%="Hello World!"%>
通過(guò)wget http://localhost/test.aspx來(lái)下載該頁(yè)面的內(nèi)容。

b.測(cè)試同一個(gè)Lan下其他機(jī)器能否訪問(wèn):
用其他機(jī)器的瀏覽器打開(kāi)http://ip/test.aspx

c.跑xsp自帶的測(cè)試程序(多點(diǎn)幾個(gè)頁(yè)面,查看是否會(huì)出現(xiàn)gdiplus.dll DllNotFoundException的一場(chǎng)):
1.修改Apache的配置,開(kāi)放防火墻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.復(fù)制/opt/mono/lib/xsp/test目錄到var/www/下
3.service httpd restart
4.用瀏覽器打開(kāi)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

轉(zhuǎn)載請(qǐng)保留鏈接: CentOS 5.1下跑Mono和Asp.net的實(shí)現(xiàn)方法

本文標(biāo)簽: 測(cè)試  端口  機(jī)器  

為您推薦

CentOS 5.1下跑Mono和Asp.net的實(shí)現(xiàn)方法分享

CentOS 5.1下跑Mono和Asp.net的實(shí)現(xiàn)方法分享 下載編譯環(huán)境: yum install gcc bison pkgconfig glib2-de

2023-09-06 00:23

CentOS下自動(dòng)備份網(wǎng)站和數(shù)據(jù)庫(kù)的腳本

CentOS下自動(dòng)備份網(wǎng)站和數(shù)據(jù)庫(kù)的腳本 接觸CentOS已經(jīng)有幾個(gè)月的時(shí)間了,使用了太久的windows在剛接觸linux命令行界面的時(shí)候還真有點(diǎn)不太適應(yīng),但

2023-09-06 00:22

為CentOS 為centos7配置一個(gè)本地yum安裝源

為CentOS v6.3 安裝最新版PostgreSQL 目前最新的CentOS 6.3中,仍然使用的是PostgreSQL 8.4版本。為了滿足另一應(yīng)用系統(tǒng)的

2023-09-06 00:22

centos6.4安裝CloudStack centos6.2安裝

centos6.4安裝CloudStack 4.2(開(kāi)源云計(jì)算平臺(tái))詳解 CloudStack 的前身是 Cloud.com 家的一款商業(yè)云計(jì)算產(chǎn)品(也有開(kāi)源版

2023-09-06 00:22

CentOS常用基礎(chǔ)命令匯總 centos操作指令

CentOS常用基礎(chǔ)命令匯總 1.關(guān)機(jī) (系統(tǒng)的關(guān)機(jī).重啟以及登出 ) 的命令 shutdown -h now 關(guān)閉系統(tǒng)(1) init 0 關(guān)閉系統(tǒng)(2) t

2023-09-06 00:22

CentOS 5.10 服務(wù)器系統(tǒng)安裝配置圖解教程

CentOS 5.10 服務(wù)器系統(tǒng)安裝配置圖解教程 說(shuō)明: 在實(shí)際生產(chǎn)環(huán)境中,CentOS 5.x系列仍然是很多服務(wù)器裝機(jī)者的首選系統(tǒng) 截止目前CentOS 5

2023-09-06 00:22