<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      下載地址:http://nginx.org/en/download.html
      安裝版本:1.10.0

      安裝配置如下:

       

      /etc/nginx 目錄

       

      /home/nginx目錄

       

      --prefix=/home/nginx --sbin-path=/usr/sbin/nginx --conf-path=/home/nginx/conf/nginx.conf --user=nginx --group=nginx --with-http_stub_status_module --with-http_ssl_module

       

      安裝Nginx時報錯

      ./configure: error: the HTTP rewrite module requires the PCRE library.
      安裝pcre-devel解決問題
      yum -y install pcre-devel
       
      如果報openssl錯誤,安裝openssl-deve就可以
      yum -y install openssl-devel

       

      下圖是沒有添加任何配置參數的截圖:./configure

       

      啟動時如果報錯:

      [emerg]: getpwnam(“nginx”) failed

      需要添加用戶和用戶組nginx:
      adduser -r -M -U nginx



      關于安裝配置,官方頁面提供的配置如下:
      --prefix=/etc/nginx
      --sbin-path=/usr/sbin/nginx
      --conf-path=/etc/nginx/nginx.conf
      --error-log-path=/var/log/nginx/error.log
      --http-log-path=/var/log/nginx/access.log
      --pid-path=/var/run/nginx.pid
      --lock-path=/var/run/nginx.lock
      --http-client-body-temp-path=/var/cache/nginx/client_temp
      --http-proxy-temp-path=/var/cache/nginx/proxy_temp
      --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
      --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
      --http-scgi-temp-path=/var/cache/nginx/scgi_temp
      --user=nginx
      --group=nginx
      --with-http_ssl_module
      --with-http_realip_module
      --with-http_addition_module
      --with-http_sub_module
      --with-http_dav_module
      --with-http_flv_module
      --with-http_mp4_module
      --with-http_gunzip_module
      --with-http_gzip_static_module
      --with-http_random_index_module
      --with-http_secure_link_module
      --with-http_stub_status_module
      --with-http_auth_request_module
      --with-threads
      --with-stream
      --with-stream_ssl_module
      --with-http_slice_module
      --with-mail
      --with-mail_ssl_module
      --with-file-aio
      --with-http_v2_module
      --with-ipv6

       

      相關配置說明如下:

      --prefix=<path> - Nginx安裝路徑。如果沒有指定,默認為 /usr/local/nginx。

      --sbin-path=<path> - Nginx可執行文件安裝路徑。只能安裝時指定,如果沒有指定,默認為<prefix>/sbin/nginx。

      --conf-path=<path> - 在沒有給定-c選項下默認的nginx.conf的路徑。如果沒有指定,默認為<prefix>/conf/nginx.conf。

      --pid-path=<path> - 在nginx.conf中沒有指定pid指令的情況下,默認的nginx.pid的路徑。如果沒有指定,默認為 <prefix>/logs/nginx.pid。

      --lock-path=<path> - nginx.lock文件的路徑,默認為<prefix>/logs/nginx.lock

      --error-log-path=<path> - 在nginx.conf中沒有指定error_log指令的情況下,默認的錯誤日志的路徑。如果沒有指定,默認為 <prefix>/logs/error.log。

      --http-log-path=<path> - 在nginx.conf中沒有指定access_log指令的情況下,默認的訪問日志的路徑。如果沒有指定,默認為 <prefix>/logs/access.log。

      --user=<user> - 在nginx.conf中沒有指定user指令的情況下,默認的nginx使用的用戶。如果沒有指定,默認為 nobody。

      --group=<group> - 在nginx.conf中沒有指定user指令的情況下,默認的nginx使用的組。如果沒有指定,默認為 nobody。

      --builddir=DIR - 指定編譯的目錄

       

      配置nginx啟動腳本:

       

      將附件中的nginx腳本保存到/etc/init.d/nginx文件,并修改兩個地方:

      nginx=”/usr/sbin/nginx” 修改成nginx執行程序的路徑。

      conffile=”/etc/nginx/nginx.conf” 修改成配置文件的路徑。

      保存后,就可以通過該腳本對nginx服務進行管理了:

      使用chkconfig進行管理

      上面的方法完成了用腳本管理nginx服務的功能,但是還是不太方便,比如要設置nginx開機啟動等。這時可以使用chkconfig來設置。

      先將nginx服務加入chkconfig管理列表:

      chkconfig --add /etc/init.d/nginx

      加完這個之后,就可以使用service對nginx進行啟動,重啟等操作了。

      $ service nginx start
      $ service nginx stop
      $ service nginx reload
      ...

      設置終端模式開機啟動:

      $ chkconfig --level 3 nginx on

       

      附件中nginx為啟動腳本 nginx啟動腳本

       

      Centos 7 添加服務啟動方法:

      CentOS 7的服務systemctl腳本存放在:/usr/lib/systemd/,有系統(system)和用戶(user)之分,需要開機不登陸就能運行的程序,存在系統服務里,即:/usr/lib/systemd/system目錄下。

      啟動腳本放到路徑/usr/lib/systemd/system/下,執行systemctl enable nginx.service令既可以完成開機啟動服務的設置

      操作服務相關的命令:

      設置開機自啟動
      systemctl enable nginx.service

      手動啟動nginx服務
      systemctl start nginx.service

      停止開機自啟動
      systemctl disable nginx.service

      查看服務當前狀態
      systemctl status nginx.service

      重新啟動服務
      systemctl restart nginx.service

      posted on 2018-03-27 17:30  jaamy  閱讀(193)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 铜山县| 日韩精品福利一二三专区| 日本高清免费不卡视频| 亚洲欧洲一区二区精品| 国产办公室秘书无码精品99| 久久亚洲AV成人网站玖玖| 宿迁市| 韩国精品一区二区三区在线观看| 亚洲精品区午夜亚洲精品区| 国产精品一区二区三区黄| 国产精品小仙女自拍视频| 日本a在线播放| 亚洲精品乱码久久久久久按摩高清 | 99在线精品视频观看免费| 国产精品自拍午夜福利| 民乐县| 国产精品香港三级国产av| 欧美精品v国产精品v日韩精品| 九色综合久99久久精品| 亚洲高潮喷水无码AV电影| 无遮无挡爽爽免费视频| 亚洲欧美日韩国产精品一区二区| 欧美一级高清片久久99| 国产福利精品一区二区| 国产精品午夜av福利| 亚洲最大av一区二区| 日韩免费码中文在线观看| 亚洲中文久久久精品无码| 激情五月天自拍偷拍视频| 白嫩少妇无套内谢视频| 久久精品国产88精品久久| 色噜噜亚洲精品中文字幕| 日本边添边摸边做边爱喷水| 高清破外女出血AV毛片| 国产乱人激情H在线观看| 乱码中文字幕| 国产精品制服丝袜无码| 午夜免费福利小电影| 介休市| 欧美午夜精品久久久久久浪潮| 国产欧美日韩视频怡春院|