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

首頁 > 網站 > Nginx > 正文

從Nginx切換到Tengine的步驟分享

2024-08-30 12:21:59
字體:
來源:轉載
供稿:網友
由淘寶網發起的Web服務器 Tengine 可以被看作一個更好的Nginx,或者是Nginx的超集。它在Nginx的基礎上,針對大訪問量網站的需求,添加了很多高級功能和特性 從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
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 盐津县| 凌海市| 浦东新区| 长顺县| 博兴县| 大邑县| 德清县| 延川县| 颍上县| 黄陵县| 麟游县| 泉州市| 黄山市| 禹城市| 广汉市| 西盟| 湘潭县| 上虞市| 恩平市| 秀山| 开原市| 民县| 广水市| 南岸区| 吕梁市| 南召县| 金寨县| 惠安县| 鸡东县| 姜堰市| 南靖县| 特克斯县| 沅陵县| 衡阳市| 左权县| 华亭县| 卓尼县| 乌苏市| 玉田县| 甘谷县| 夏河县|