久久久久无码精品,四川省少妇一级毛片,老老熟妇xxxxhd,人妻无码少妇一区二区

CentOS上搭建Nginx+Mono運(yùn)行asp.net環(huán)境配置教程

時(shí)間:2024-09-15 01:57:26 ASP 我要投稿
  • 相關(guān)推薦

CentOS上搭建Nginx+Mono運(yùn)行asp.net環(huán)境配置教程

  安裝步驟:

  一、獲取開源相關(guān)程序:

  1、利用CentOS Linux系統(tǒng)自帶的yum命令安裝、升級(jí)所需的程序庫(kù):

  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安裝包:下載地址:http://nginx.org/en/download.html

  mkdir -p /down

  cd /down

  wget http://nginx.org/download/nginx-1.1.11.tar.gz

  Mono下載:官網(wǎng):http://download.mono-project.com/sources/mono/(請(qǐng)下載最新版)

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

  libgdiplus下載:http://download.mono-project.com/sources/libgdiplus/(請(qǐng)下載最新版)

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

  xsp下載:http://download.mono-project.com/sources/xsp/(請(qǐng)下載最新版)

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

  pcre下載(Nginx所需的pcre庫(kù)):ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/(請(qǐng)下最新版)

  wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.gz

  二、安裝編譯Nginx:

  1、安裝安裝Nginx所需的pcre庫(kù):

  cd /down

  tar zxvf pcre-8.21.tar.gz

  cd pcre-8.21/

  ./configure

  make && make install

  cd ../

  2、創(chuàng)建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 nginx-1.1.11.tar.gz

  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

  啟動(dòng)nginx

  /opt/nginx/sbin/nginx

  在瀏覽器上輸入訪問(wèn)地址 http://192.168.1.1(根據(jù)個(gè)人本機(jī)地址頁(yè)定),正常會(huì)看到默認(rèn)nginx頁(yè)面

  三、安裝編譯Mono

  1、安裝libgdiplus:

  cd /down

  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

  2、安裝Mono:

  tar –jxvf mono-2.10.7.tar.bz2

  cd mono-2.10.7

  ./configure --prefix=/opt/mono

  make && make install //此處時(shí)間較長(zhǎng)

  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版本信息,則安裝成功.

  3、安裝XSP:

  cd /down

  tar –jxvf xsp-2.10.2.tar.bz2

  ./configure --prefix=/opt/mono

  make && make install

  四、配置Nginx

  vi /opt/nginx/conf/nginx.conf

  server {

  listen 80;

  server_name localhost;

  location / {

  root /data0/web;

  index index.html index.htm;

  fastcgi_index Default.aspx;

  fastcgi_pass 127.0.0.1:9000;

  include fastcgi_params;

  }

  }

  五、配置fastcgi_params增加下面兩行:

  vi /opt/nginx/conf/fastcgi_params

  fastcgi_param PATH_INFO "";

  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

  六、啟動(dòng):

  1、重啟nginx:

  /opt/nginx/sbin/nginx -s reload

  2、啟動(dòng) fastcgi_mono服務(wù)器

  fastcgi-mono-server2 /applications=/:/data0/web /socket=tcp:127.0.0.1:9000 &

  七、測(cè)試:

  新建一個(gè)asp.net web項(xiàng)目上傳至 /data0/web目錄下,測(cè)試運(yùn)行。

【CentOS上搭建Nginx+Mono運(yùn)行asp.net環(huán)境配置教程】相關(guān)文章:

了解PHP環(huán)境搭建與配置的方法08-03

ASP.NET MVC異常處理模塊簡(jiǎn)單教程-ASP.NET教程實(shí)例推薦07-19

h3c交換機(jī)配置telnet配置教程07-31

精簡(jiǎn)路由配置的VRF通信教程10-29

配置 PHP 調(diào)試環(huán)境07-20

思科路由器撥號(hào)上網(wǎng)配置教程06-07

H3C交換機(jī)配置靜態(tài)路由教程05-22

Java程序開發(fā)與運(yùn)行環(huán)境06-21

Eclipse j2ee開發(fā)環(huán)境的搭建12-26

在Cisco IOS中配置IPv6防火墻案例教程12-31