日韩亚洲AV无码一区二区三区|av在线国产哟哟|国产精品人人爽人人爽AV|免费一区二区精品无码视频

<th id="kwciy"><video id="kwciy"></video></th>
<code id="kwciy"><em id="kwciy"><optgroup id="kwciy"></optgroup></em></code>
    1. <center id="kwciy"></center>

      <code id="kwciy"></code>

      0712-2888027 189-8648-0214
      微信公眾號

      孝感風(fēng)信網(wǎng)絡(luò)科技有限公司微信公眾號

      當(dāng)前位置:主頁 > 技術(shù)支持 > Linux > 騰訊云centos 6.5掛載云數(shù)據(jù)盤實(shí)例

      騰訊云centos 6.5掛載云數(shù)據(jù)盤實(shí)例

      時(shí)間:2016-03-14來源:風(fēng)信官網(wǎng) 點(diǎn)擊: 892次

      Nginx是通過apt-get的方式安裝的,所以我的路徑與下載代碼再編譯、安裝的有些不一樣,我的升級過程如下

      1.進(jìn)入Downloads文件夾

      cd /Downloads

      2.下載nginx-1.2.5.tar.gz文件到Downloads文件夾中

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

      3.解壓nginx-1.2.5.tar.gz文件

      tar zxvf nginx-1.2.5.tar.gz

      4.進(jìn)入ngixn-1.2.5文件夾中

      cd nginx-1.2.5

      5.查看nginx原來的配置

      nginx -V
      

      上面的命令將輸出:

      --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module

      6.執(zhí)行configure命令,后面跟上原來nginx的配置

      ./configure --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module

      在執(zhí)行configure時(shí)得到幾個(gè)錯(cuò)誤:

      a.配置 --with-http_xslt_module 時(shí)提示 the HTTP XSLT module requires the libxml2/libxslt libraries

      sudo apt-get install libxml2 libxml2-dev libxslt-dev

      b.配置 --with-http_image_filter_module 時(shí)提示 the HTTP image filter module requires the GD library.

      sudo apt-get install libgd2-xpm libgd2-xpm-dev

      c.配置 --with-http_geoip_module 時(shí)提示 the GeoIP module requires the GeoIP library.

      sudo apt-get install geoip-database libgeoip-dev

      d.rewrite需要pcre支持, 錯(cuò)誤提示:./configure: error: the HTTP rewrite module requires the PCRE library.

      apt-get install libpcre3 libpcre3-dev

       

      7.再執(zhí)行第6步的configure命令

      8.這次沒有提示缺少library, 執(zhí)行make令命編譯nginx, 編譯好以后objs目錄下多出一個(gè)nginx文件,這個(gè)就是已編輯好的nginx程序

      make
      

      9.更改舊的nginx程序的名子,并復(fù)制新的程序過去,我的舊nginx程序放在/usr/sbin/目錄中

      mv /usr/sbin/nginx /usr/sbin/nginx-20121122
      
      cp objs/nginx /usr/sbin/nginx
      /usr/sbin/nginx -t

      執(zhí)行/usr/sbin/nginx -t 命令檢查配置文件并將返回下面的信息:

      nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
      nginx: configuration file /etc/nginx/nginx.conf test is successful

      10.在nginx-1.2.5目錄下執(zhí)行下面的命令來升級nginx

      make upgrade

      11.執(zhí)行make upgrade得到一個(gè)錯(cuò)誤:

      make: /etc/nginx/sbin/nginx: Command not found
      make: *** [upgrade] Error 127

      12.用文本編輯器打開修改nginx-1.2.5目錄下名為Makefile的文件,將upgrade節(jié)點(diǎn)中的/etc/nginx/sbin/nginx改為/usr/sbin/nginx -t,保存后關(guān)閉并重新執(zhí)行make upgrade命令

      13.執(zhí)行nginx -v命令,程序的版本號已經(jīng)是1.2.5,升級完畢.

      熱門關(guān)鍵詞: 騰訊云 centos 掛載云數(shù)據(jù)盤
      欄目列表
      推薦內(nèi)容
      熱點(diǎn)內(nèi)容
      展開