1. 程式人生 > >Centos下安裝MONO

Centos下安裝MONO

#安裝centos,配置系統時,開發部分除最後一個不選之外全部選上

#更新系統

yum -y update

#安裝相關的編譯器
yum install glib2-devel
yum install gcc
yum install gcc-c++
yum install bison

#檢查是否安裝了apache
apachectl

#查詢apache安裝目錄
which httpd

#刪除之
rm -r /usr/sbin/httpd

#重新下載安裝
wget http://labs.xiaonei.com/apache-mirror/httpd/httpd-2.2.14.tar.bz2
tar jxvf httpd-2.2.14.tar.bz2
cd httpd-2.2.14
./configure --prefix=/usr/local/apache2 --enable-shared=max --enable-module=rewrite --with-apxs2=/usr/local/apache/bin/apxs --enable-module=so
make
make install

#下載安裝mono
cd ../
wget http://ftp.novell.com/pub/mono/sources/mono/mono-2.4.2.3.tar.bz2
tar jxvf mono-2.4.2.3.tar.bz2
cd mono-2.4.2.3
./configure
make
make install

#安裝xsp
cd ../
wget http://ftp.novell.com/pub/mono/sources/xsp/xsp-2.4.2.tar.bz2
tar jxvf xsp-2.4.2.tar.bz2
cd xsp-2.4.2
./configure
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
make
make install

#安裝mod_mono
cd ../
wget http://ftp.novell.com/pub/mono/sources/mod_mono/mod_mono-2.4.2.tar.bz2
tar jxvf mod_mono-2.4.2.tar.bz2
cd mod_mono-2.4.2
./configure
make
make install

#在配置檔案 /usr/local/apache2/httpd.conf 新增如下行:

#之後重新啟動apache
/usr/local/apache2/bin/apachectl restart


#開啟IE進行測試,地址是http://ip:port/test/