CentOS上搭建Nginx+Mono運行asp.net環境配置教程
安裝步驟:
一、獲取開源相關程序:
1、利用CentOS Linux系統自帶的命令安裝、升級所需的程序庫:
sudo -s
LANG=C
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel bison pkgconfig glib2-devel gettext make
2、下載程序源碼包:
Nginx安裝包:下載地址:
mkdir -p /down
cd /down
wget
Mono下載:官網:(請下載最新版)
wget
libgdiplus下載:(請下載最新版)
wget
xsp下載:(請下載最新版)
wget
pcre下載(Nginx所需的pcre庫):(請下最新版)
wget
二、安裝編譯Nginx:
1、安裝安裝Nginx所需的pcre庫:
cd /down
tar zxvf
cd pcre-8.21/
./configure
make && make install
cd ../
2、創建www用户和組
/usr/sbin/groupadd www
/usr/sbin/useradd -g www www
mkdir -p /data0/web
chmod +w /data0/web
chown -R www:www /data0/web
3、安裝Nginx
tar zxvf
cd nginx-1.1.11/
./configure --user=www --group=www --prefix=/opt/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
cd ../
4、開放80端口:
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
啟動nginx
/opt/nginx/sbin/nginx
在瀏覽器上輸入訪問地址 (根據個人本機地址頁定),正常會看到默認nginx頁面
三、安裝編譯Mono
1、安裝libgdiplus:
cd /down
tar -jxvf 2
cd libgdiplus-2.10
./configure --prefix=/opt/mono
make && make install
echo "/opt/mono/lib" > /etc/.d/
ldconfig
2、安裝Mono:
tar –jxvf 2
cd mono-2.10.7
./configure --prefix=/opt/mono
make && make install //此處時間較長
echo export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig:$PKG_CONFIG_PATH>>~/_profile
echo export LD_LIBRARY_PATH=/opt/mono/lib:$LD_LIBRARY_PATH>>~/_profile
echo export PATH=/opt/mono/bin:$PATH>>~/_profile
source ~/_profile
輸入 mono -V 如有mono版本信息,則安裝成功.
3、安裝XSP:
cd /down
tar –jxvf 2
./configure --prefix=/opt/mono
make && make install
四、配置Nginx
vi /opt/nginx/conf/
server {
listen 80;
server_name localhost;
location / {
root /data0/web;
index ;
fastcgi_index ;
fastcgi_pass ;
include fastcgi_params;
}
}
五、配置fastcgi_params增加下面兩行:
vi /opt/nginx/conf/fastcgi_params
fastcgi_param PATH_INFO "";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
六、啟動:
1、重啟nginx:
/opt/nginx/sbin/nginx -s reload
2、啟動 fastcgi_mono服務器
fastcgi-mono-server2 /applications=/:/data0/web /socket=tcp: &
七、測試:
新建一個 web項目上傳至 /data0/web目錄下,測試運行。
-
網頁設計的佈局
網頁設計的工作目標,是通過使用更合理的顏色、字體、圖片、樣式進行頁面設計美化,在功能限定的情況下,儘可能給予用户完美的視覺體驗。以下是小編為您帶來的網頁設計的佈局,看看吧!網頁設計的佈局11、響應式網頁設計響應式網頁設計是網頁設計的一種技術,可在N多種瀏...
-
網頁設計黃金配色原則是什麼
身為網頁設計新手的你,是不是還在糾結於你製作的網頁找不到一組完美的配色方案?在本教程中我們將與你分享6條肯定會火,並且“錯不了”的指導方針,你可以按照這些原則把握最基本的色彩規律。現在我們分享的這些原則都不是規則,你會在你的職業生涯中創造出更多的配色...
-
Dreamweaver輸入的文本字體怎樣加粗
Dreamweaver輸入的文本字體怎麼加粗?Dreamweaver中想要加粗輸入的文本,該怎麼加粗呢?這都是最基礎的教程,很簡單,需要的朋友可以參考下,下面就跟隨小編一起來看看吧!Dreamweaver怎麼給字體加粗,下面我們就來看看詳細的.教程。1、打開我的軟件2、文件新建一個3、新建...
-
JavaScript基本語法分析
一、JavaScript基本語法。(一)數據類型與變量類型。整數,小數,佈局,字符串,日期時間,數組強制轉換:parseInt()parseFloat()isNaN()(二)數組var數組名=newArray([長度]);//“假冒”數組th-長度a[下標]=值。a[下標](三)函數複製代碼代碼如下:function函數名(形參){}function...
相關文章
- Linux Mint Cinnamon下使用vino-server配置桌面共享的方法
- 七年級上 Unit One Topic One Section A説課材料
- 分享SAT閲讀練習題:Reading Comprehension Test 14
- 託福英語寫作範文:Examinations exert a pernicious influence on educat
- Unit 13 Lesson50 Standing Room Only説課稿
- An Exciting Sports Meeting英語作文
- Is a Test of Spoken English Necessary英語四級作文
- 提示operating system not found的解決方法
- 我的英語演講稿living at present is my top concern
- Unit six Opening and Closing Ceremonies口譯材料