国产探花免费观看_亚洲丰满少妇自慰呻吟_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
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 武宣县| 临猗县| 栖霞市| 永登县| 涿州市| 扎赉特旗| 屏南县| 农安县| 石柱| 哈尔滨市| 鲁甸县| 巴林左旗| 绍兴市| 澄城县| 洱源县| 青浦区| 南丰县| 甘孜| 宁波市| 根河市| 张家川| 荥阳市| 宁强县| 东山县| 大余县| 渑池县| 皋兰县| 平陆县| 光泽县| 西乌珠穆沁旗| 屏东市| 甘孜县| 青河县| 台中县| 龙南县| 田林县| 临潭县| 东港市| 西丰县| 盐山县| 板桥市|