国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > Nginx > 正文

從Nginx切換到Tengine的步驟分享

2024-08-30 12:27:12
字體:
來源:轉載
供稿:網友
從Nginx切換到Tengine主要是因為 concat 模塊(合并js、css),以及動態加載模塊功能(DSO)。
如果已經用apt-get方式安裝了Nginx,可以嘗試以下步驟以切換到Tengine(不需要卸載Nginx):

1. 到官方下載你喜歡的Tengine版本,這里以最新版(1.4.0)為例,

代碼如下:
wget http://tengine.taobao.org/download/tengine-1.4.0.tar.gz

2. 解壓縮:

代碼如下:
tar -xvzf tengine-1.4.0.tar.gz

3. 進入解壓出來的文件夾:
代碼如下:
cd tengine-1.4.0/

4. 查看當前Nginx的編譯參數:

代碼如下:
nginx -V


得到結果如下:

代碼如下:
nginx: nginx version: nginx/1.0.5
nginx: TLS SNI support enabled
nginx: configure arguments: --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 --add-module=/build/buildd/nginx-1.0.5/debian/modules/nginx-echo --add-module=/build/buildd/nginx-1.0.5/debian/modules/nginx-upstream-fair


5. 根據上面第三行的配置編譯Tengine,具體做法:從--prefix=/etc/nginx開始復制第三行的代碼,然后在--with-debug后面加上--with-http_concat_module(意前后需要有空格),并刪掉從--add-module開始的代碼(否則會編譯不過),完整的編譯腳本如下:

代碼如下:
./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_concat_module --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


如果編譯中出現類似下面的錯誤,說明編譯依賴模塊不存在,你可以選擇安裝或者如果你不需要這個模塊的話,從上面的編譯腳本中刪除后再一次執行編譯腳本,直到編譯完成:
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 连州市| 江山市| 阿荣旗| 乃东县| 江都市| 泗阳县| 高邑县| 师宗县| 永春县| 泽普县| 娄底市| 沽源县| 文安县| 江安县| 收藏| 四川省| 绥江县| 桂林市| 威海市| 荣成市| 微博| 马尔康县| 山阳县| 广南县| 高清| 阿城市| 贵南县| 芜湖市| 沙洋县| 越西县| 中江县| 宁阳县| 荆门市| 岳西县| 京山县| 兴和县| 建湖县| 铜梁县| 栾城县| 平度市| 郴州市|