<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>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Nginx編譯安裝[1.12.2] [TOC] ## 1. 安裝依賴包 ```sh yum install -y pcre-devel openssl-devel ``` ## 2. 創建虛擬用戶,創建目錄 ```sh useradd nginx -s /sbin/nologin/ -M mkdir -p /server/tools mkdir -p /app mkdir -p /var/log/nginx mkdir -p /data/html/www ``` ## 3. 下載并安裝軟件 ```sh cd /server/tools wget http://nginx.org/download/nginx-1.12.2.tar.gz tar xf nginx-1.12.2.tar.gz ``` ## 4. 編譯安裝 ```sh cd nginx-1.12.2 ./configure \ --prefix=/app/nginx-12.2 \ --user=ngixn --group=nginx \ --with-http_ssl_module \ --with-http_stub_status_module make && make install ``` **參數簡述:** ```sh --prefix=PATH 指定軟件安裝在什么目錄下 --user=USER --group=USER 指定軟件worker進程管理用戶 --with-http_ssl_module 使nginx程序可以支持HTTPsF訪問功能 --with-http_stub_status_module 用于監控用戶訪問nginx服務情況 ``` ## 5. 創建軟連接, ```sh ln -s /app/nginx-12.2 /app/nginx ``` ## 6. 精簡優化配置文件 改變默認配置文件內容 ```sh cat >/app/nginx/conf/nginx.conf <<"EOF" user nginx; worker_processes auto; error_log /var/log/nginx/error.log error; pid /var/run/nginx.pid; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include mime.types; default_type application/octet-stream; include conf.d/*.conf; } EOF ``` 創建conf.d目錄和拷貝默認網頁 ```sh mkdir -p /app/nginx-12.2 /app/nginx/conf/conf.d cp -a ./html/* /data/html/ ``` 寫入一個默認server ```sh cat >/app/nginx/conf/conf.d/default.conf <<"EOF" server { listen 80; server_name localhost; root /data/html/; location / { root html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } EOF ``` 以后新增server,按以上內容方式增加即可 ## 7. 創建啟停腳本 創建啟停腳本[略] 加入開機自啟動[略] 啟動 ```sh /app/nginx/sbin/nginx ```
                  <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>

                              哎呀哎呀视频在线观看