1. <var id="fe6gj"></var>

    <rp id="fe6gj"><nav id="fe6gj"></nav></rp>

    <noframes id="fe6gj"><cite id="fe6gj"></cite>

    <ins id="fe6gj"><button id="fe6gj"><p id="fe6gj"></p></button></ins>
    1. <tt id="fe6gj"><i id="fe6gj"><sub id="fe6gj"></sub></i></tt>
        始創于2000年 股票代碼:831685
        咨詢熱線:0371-60135900 注冊有禮 登錄
        • 掛牌上市企業
        • 60秒人工響應
        • 99.99%連通率
        • 7*24h人工
        • 故障100倍補償
        您的位置: 網站首頁 > 幫助中心>文章內容

        Nginx安裝方法

        發布時間:  2012/7/27 18:10:19

         第一步,安裝PHP
          安裝前先檢查依賴關系:
          rpm -ivh php-5.1.6-27.el5.x86_64.rpm
          warning: php-5.1.6-27.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
          error: Failed dependencies:
          httpd-mmn = 20051115 is needed by php-5.1.6-27.el5.x86_64
          php-cli = 5.1.6-27.el5 is needed by php-5.1.6-27.el5.x86_64
          php-common = 5.1.6-27.el5 is needed by php-5.1.6-27.el5.x86_64
          需要以上包!
          1.先安裝httpd-2.2.3-43.el5.x86_64.rpm
          2.安裝php-common-5.1.6-27.el5.x86_64.rpm
          3.安裝php-cli-5.1.6-27.el5.x86_64.rpm
          以上依賴關系包安裝完后,安裝PHP
          php-5.1.6-27.el5.x86_64.rpm
          第二步,安裝pcre
          pcre-8.00.tar.gz   解壓執行安裝命令 ./configure    make   makeinstall
          第三步,安裝Nginx
          先安裝依賴關系
          zlib-devel-1.2.3-3.x86_64.rpm
          openssl-0.9.8e-12.el5_4.6.x86_64.rpm
          e2fsprogs-devel-1.39-23.el5.x86_64.rpm
          keyutils-libs-devel-1.2-1.el5.x86_64.rpm
          libsepol-devel-1.15.2-3.el5.x86_64.rpm
          libselinux-devel-1.33.4-5.5.el5.x86_64.rpm
          krb5-devel-1.6.1-36.el5_4.1.x86_64.rpm
          openssl-devel-0.9.8e-12.el5_4.6.x86_64.rpm
          openssl097a-0.9.7a-9.el5_2.1.x86_64.rpm
          xmlsec1-1.2.9-8.1.1.x86_64.rpm
          xmlsec1-openssl-1.2.9-8.1.1.x86_64.rpm
          libgpg-error-devel-1.4-2.x86_64.rpm
          libgcrypt-devel-1.4.4-5.el5.x86_64.rpm
          libxml2-devel-2.6.26-2.1.2.8.x86_64.rpm
          libxslt-devel-1.1.17-2.el5_2.2.x86_64.rpm
          openssl-devel-0.9.8e-12.el5_4.6.x86_64.rpm
          xmlsec1-devel-1.2.9-8.1.1.x86_64.rpm
          xmlsec1-openssl-devel-1.2.9-8.1.1.x86_64.rpm
          直接去http://nginx.org/ 下載最新版本的,然后就 ./configure, make, make install 普通安裝就行了
          第四步,安裝spawn-fcgi
          去 http://redmine.lighttpd.net/news/2 下載 spawn-fcgi-1.6.0.tar.gz
          解壓 執行 ./configure 和 make
          然后在 src 目錄下有個 spawn-fcgi ,
          用 cp -r spawn-fcgi /usr/local/nginx/sbin/spawn-fcgi 拷貝到 nginx 的執行目錄
          然后啟動 spawn-fcgi 方法: ./spawn-fcgi -a 127.0.0.1 -p 9000 -f /usr/bin/php-cgi
          在nginx的執行目錄下執行
          第五步,配置Nginx
          1. 在下面添加紅色的代碼
          server {
          listen 80;
          server_name localhost;
          #charset koi8-r;
          #access_log logs/host.access.log main;
          location / {
          root html;
          index index.html index.php;
          }
          2. 找到下面的代碼,把注釋去了
          紅色部分是關鍵,要看 /usr/local/nginx/conf 目錄下面的 fastcgi 文件名字是什么
          location ~ \.php$ {
          root html;
          fastcgi_pass 127.0.0.1:9000;
          fastcgi_index index.php;
          fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
          include fastcgi.conf;
          }
          第六步,啟動 Nginx
          直接在 /usr/local/nginx/sbin 目錄下 ./nginx 就搞定了
          第七部,修改nginx配置文件
          在配置文件中找到以下字段:
          location ~ \.php$ {
          root           html;
          fastcgi_pass   127.0.0.1:9000;
          fastcgi_index  index.php;
          fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
          include        fastcgi_params;
          將藍色部分改為 /$document_root$fastcgi_script_name
          重啟nginx(nginx  –s  reload)
          第八步,測試nginx+php環境
          創建index.php文件,內容為:<?php phpinfo();?>
          第九步,添加啟動項
          編輯/etc/rc.local文件,添加如下內容
          /usr/local/nginx/sbin/nginx
          /usr/local/nginx/sbin/spawn-fcgi -a 127.0.0.1 -p 9000 -f /usr/bin/php-cgi

        億恩科技地址(ADD):鄭州市黃河路129號天一大廈608室 郵編(ZIP):450008 傳真(FAX):0371-60123888
           聯系:億恩小凡
           QQ:89317007
           電話:0371-63322206


        本文出自:億恩科技【www.endtimedelusion.com】

        服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM]

      1. 您可能在找
      2. 億恩北京公司:
      3. 經營性ICP/ISP證:京B2-20150015
      4. 億恩鄭州公司:
      5. 經營性ICP/ISP/IDC證:豫B1.B2-20060070
      6. 億恩南昌公司:
      7. 經營性ICP/ISP證:贛B2-20080012
      8. 服務器/云主機 24小時售后服務電話:0371-60135900
      9. 虛擬主機/智能建站 24小時售后服務電話:0371-60135900
      10. 專注服務器托管17年
        掃掃關注-微信公眾號
        0371-60135900
        Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權所有  地址:鄭州市高新區翠竹街1號總部企業基地億恩大廈  法律顧問:河南亞太人律師事務所郝建鋒、杜慧月律師   京公網安備41019702002023號
          0
         
         
         
         

        0371-60135900
        7*24小時客服服務熱線

         
         
        av不卡不卡在线观看_最近2018年中文字幕_亚洲欧美一区二区三区_一级A爱做片免费观看国产_日韩在线中文天天更新_伊人中文无码在线