1. 程式人生 > >linux(centos)系統上架設asp.net網站

linux(centos)系統上架設asp.net網站

本實驗在虛擬機器下測試通過
虛擬機器IP 192.168.199.146

安裝好 CentOS 6.5 之後

1、更新系統

在命令列下執行

yum –y update

2、安裝必要的軟體

yum -y 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

3、安裝Mono需要的GDI+相容API的庫Libgdiplus

cd /usr/local/src/
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-3.8.tar.gz
tar zxvf libgdiplus-3.8.tar.gz
cd libgdiplus-3.8
./configure --prefix=/usr
make
make install

4、安裝Mono (過程時間比較長,耐心等待)

cd /usr/local/src/
wget http://download.mono-project.com/sources/mono/mono-3.10.0.tar.bz2
tar -jxvf mono-3.10
.0.tar.bz2 cd mono-3.10.0 ./configure --prefix=/usr make make install

上述命令執行完畢之後,輸入 mono -V 如有mono版本資訊,則安裝成功。
如下:

[root@localhost ~]# mono -V
Mono JIT compiler version 3.10.0 (tarball 20141228日 星期日 02:47:02 CST)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV
: altstack Notifications: epoll Architecture: amd64 Disabled: none Misc: softdebug LLVM: supported, not enabled. GC: sgen

5、安裝Jexus

cd /usr/local/src/
wget http://www.linuxdot.net/down/jexus-5.6.3.tar.gz
tar -zxvf jexus-5.6.3.tar.gz
cd jexus-5.6.3
sudo ./install

6、啟動 停止 重啟 Jexus

啟動:

sudo /usr/jexus/jws start

停止:

sudo /usr/jexus/jws stop

重啟:

sudo /usr/jexus/jws restart

7、測試

首先配置防火牆開放80埠

/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
/etc/rc.d/init.d/iptables save

開啟瀏覽器訪問

到此為止可以看到 Jexus 是可以正常執行的

詳細的Jexus 使用說明後期整理

比如:

重啟指定網站:

sudo /usr/jexus/jws restart siteName

停止指定網站:

sudo /usr/jexus/jws stop siteName