<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [下載](http://nginx.org/en/download.html)nginx 安裝依賴包:(必須:openssl、pcre、zlib ,gcc是所有安裝包都依賴的) * 檢查openssl是否安裝:rpm -qa openssl openssl-devel * 檢查pcre是否安裝:rpm -qa pcre-devel pcre * 檢查zlib是否安裝:rpm -qa zlib-devel zlib ![](https://img.kancloud.cn/8e/e6/8ee6b3f053402d678d8f6ba2ca67bd8c_534x162.png) 關于zlib與zlib-devel的區別: ~~~ 以 zlib和 zlib-devel(有的是**-dev) 為例: 如果你安裝基于 zlib 開發的程序,只需要安裝 zlib 包就行了。 但是如果你要編譯使用了 zlib 的源代碼,則需要安裝 zlib-devel。 ~~~ ~~~ yum install gcc gcc-c++ make automake autoconf libtool pcre* zlib openssl openssl-devel ~~~ wget http://nginx.org/download/nginx-1.17.1.tar.gz 解壓并進入解壓后的目錄:tar -zxvf nginx-1.17.1.tar.gz 創建運行的用戶和組: ~~~ groupadd nginx useradd -M -s /sbin/nologin -g nginx nginx 或者useradd -M -s /sbin/nologin nginx (這樣也沒問題:useradd nginx -M -s /sbin/nologin) ~~~ 查看創建的用戶 cat /etc/passwd nginx:x:1001:1001::/home/nginx:/sbin/nologin 格式: 用戶名:密碼:用戶id:用戶所在組的id:備注:家目錄:執行shell類型可執行文件命令的目錄 重新賦予權限: ~~~ mkdir /usr/local/nginx chmod -R 755 /usr/local/nginx/ chown nginx:nginx /usr/local/nginx/ ~~~ 配置: 參數之間至少有一個空格隔開且不能有\\r\\n換行符 ./configure --prefix=/usr/local/nginx --conf-path=/usr/local/nginx/config/nginx.conf --user=nginx --group=nginx --with-http\_stub\_status\_module --with-http\_ssl\_module --with-email ./configure --prefix=/usr/loacl/nginx? \--sbin-path=/usr/local/nginx? \--conf-path=/usr/local/nginx/config/nginx.conf? \--pid-path=/usr/local/nginx/nginx.pid? \--with-http\_ssl\_module? ?--with-http\_perl\_module \--with-zlib=/tmp/zlib-1.2.11? ?     非yum安裝的需要指定安裝目錄 \--with-pcre=/tmp/pcre-8.41? ? ? ? ? ? ? ? ? 同上 \--with-openssl=/tmp/openssl-1.0.21? ? 同上 ############ \--prefix=PATH ? ? ?要安裝到的目錄 \--sbin-path=PATH ? 指定nginx二進制文件的路徑,沒指定的話這個路徑依賴 --prefix 選項 \--conf-path=PATH ? 如果在命令行未指定配置文件,那么將會通過 --prefix 指定的路徑去查找配置文件 \--error-log-path=PATH ?錯誤文件路徑,nginx寫入錯誤日志文件地址 \--pid-path= ? nginx master進程pid寫入的文件位置,通常在var/run下? \--user= ? ? ? worker進程運行的用戶 \--group= ? ? worker進程運行的組 \--with-http\_ssl\_module 開啟 ssl 模塊 \--with-zlib=DIR 設置 指向zlib 的源碼目錄 \--with-openssl=DIR ?設置 指向openssl 的源碼目錄 \--with-pcre=DIR設置 指向pcre 的源碼目錄 ?--with-http\_stub\_status\_module ~~~ make && make install ~~~ 安裝完成可執行文件是/usr/local/nginx/sbin/nginx 校驗配置文件: /usr/local/nginx/sbin/nginx -t # 校驗默認的配置文件 /usr/local/nginx/sbin/nginx -t -c /path/to/configfile # 校驗指定配置文件 啟動: /usr/local/nginx/sbin/nginx #自動讀取配置文件目錄下的“nginx.conf”配置文件 /usr/local/nginx/sbin/nginx -c /path/to/configfile #指定配置文件啟動 查看是否啟動 **ps -ef | grep nginx** 停止: /usr/local/nginx/sbin/nginx -s stop # 快速關閉 /usr/local/nginx/sbin/nginx -s quit # 安全關閉 重載 /usr/local/nginx/sbin/nginx -s reload # 重載配置文件 查看版本 /usr/local/nginx/sbin/nginx -V 設置全局命令 ~~~ export PATH=$PATH:/usr/local/nginx/sbin/ #PATH變量后裔可定義多個以:分割。例: PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin exprot PATH ~~~ 切割日志 nginx -s reload #重新打開一個log文件,用于日志切割 防火墻放行80端口 firewall-cmd --zone=public --add-port=80/tcp --permanent 重啟防火墻: systemctl restart firewalld.service(centos7之前使用service iptables restart) 瀏覽器訪問ip地址成功!
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看