CentOS 6.0 安裝 MONO 2.10.8

來源:互聯網
上載者:User

1.更新系統   

 yum update

 

2.安裝必要的相關庫   

 yum 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 httpd httpd-devel

 

3.安裝 libgdiplus

 cd /usr/local/src/

 wget http://download.mono-project.com/sources/libgdiplus/libgdiplus-2.10.tar.bz2

 tar -jxvf libgdiplus-2.10.tar.bz2

 cd libgdiplus-2.10

 ./configure --prefix=/opt/mono

 make

 make install

 echo "/opt/mono/lib" > /etc/ld.so.conf.d/mono.conf

 ldconfig 

 

4.安裝 mono  

 cd /usr/local/src/ 

 wget http://download.mono-project.com/sources/mono/mono-2.10.8.tar.bz2

 tar -jxvf mono-2.10.8.tar.bz2

 cd mono-2.10.8

 ./configure --prefix=/opt/mono

 make  

 漫長的等待.......

 make install

 echo export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH>>~/.bash_profile

 echo export LD_LIBRARY_PATH=/opt/mono/lib:$LD_LIBRARY_PATH>>~/.bash_profile

 echo export PATH=/opt/mono/bin:$PATH>>~/.bash_profile

 source ~/.bash_profile

 

 輸入 mono -V 如有mono版本資訊,則安裝成功. 

 

 5.安裝mono xsp-2.10

 cd /usr/local/src/ 

 wget http://download.mono-project.com/sources/xsp/xsp-2.10.tar.bz2

 tar jxvf xsp-2.10.tar.bz2

 cd xsp-2.10

 ./configure -prefix=/opt/mono

 make

 make install

 

6.安裝mod_mono-2.10

 cd /usr/local/src/ 

 wget http://download.mono-project.com/sources/mod_mono/mod_mono-2.10.tar.bz2

 tar jxvf mod_mono-2.10.tar.bz2

 cd mod_mono-2.10

 ./configure -prefix=/opt/mono

 make; 

 make install

 

mod_mono配置:cp /etc/httpd/conf/mod_mono.conf /etc/httpd/conf.d/mod_mono.conf在mod_mono.conf中加入如下配置

MonoServerPath /opt/mono/bin/mod-mono-server4 

 

修改/etc/profile,在末端添加

MONO_HOME=/opt/monoPATH=$MONO_HOME/bin:$PATHCLASSPATH=.:$MONO_HOME/lib/export MONO_HOMEexport PATHexport CLASSPATH

 

測試是否能夠執行aspx: 

在/var/www/html/目錄下建一個test.aspx頁面,內容為 
<%="Hello World!"%> 
通過wget http://localhost/test.aspx來下載該頁面的內容。 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.