標籤:centos7 std app repo ack mirrors config org users
1 因為163沒有CentOs7的鏡像。所以沒有加這個 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/home:tpokorra:mono/CentOS_CentOS-7/home:tpokorra:mono.repo
yum makecache
yum install mono-opt
yum install mod_mono-opt
2 檢測是否安裝好
yum list installed | grep mono
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZ3JlZW5lcnk=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" >
3 加入mono工作路徑
改動/etc/profile,在末端加入vi /etc/profile
MONO_HOME=/opt/mono
PATH=$MONO_HOME/bin:$PATH
CLASSPATH=.:$MONO_HOME/lib/
export MONO_HOME
export PATH
export CLASSPATH
4 安裝 Jexus
cd /tmp
wget linuxdot.net/down/jexus-5.6.2.tar.gz
tar -zxvf jexus-5.6.2.tar.gz
cd jexus-5.6.2
sudo ./install
cd ..
rm -f jexus-5.6.2.tar.gz
rm -fr jexus-5.6.2
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZ3JlZW5lcnk=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" >
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZ3JlZW5lcnk=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" >
假設出現 An exception was thrown by the type initializer for Mono.Unix.Native.Stdlib
可能是 mod_mono未安裝。或未 ldconfig
5 啟動 Jexus
手工啟動 /usr/jexus/jws start
開機自己主動啟動:
在/etc/rc.local 或類試的開機啟動指令碼中增加以下這一行命令:
mono /usr/jexus/jws.exe >/dev/null 2>&1 &
6 測試頁面mkdir /var/www/defalut
echo \<% ="hello world" %\> > default.aspx
瀏覽器查看就可以
參考資料http://jexus.org/
Linux搭建aspx.net環境之:CentOs 7 安裝 Mono 和 Jexus 步驟記錄