mongona

mongona
-- --
正在获取天气

Tengine 安装配置

Tengine 安装配置

“Tengine是由淘宝网发起的Web服务器项目。它在Nginx 的基础上,针对大访问量网站的需求,添加了很多高级功能和特性。Tengine的性能和稳定性已经在大型的网站如淘宝网 ,天猫商城 等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的Web平台。”

很diao的样子, 那就搞呗!

地址:http://tengine.taobao.org/download_cn.html

 

挑个最新的:

wget http://tengine.taobao.org/download/tengine-2.3.2.tar.gz

下哪无所谓, 解压就完事:

tar zxvf tengine-2.3.2.tar.gz

进去编译吧 configure&&make&&make install 等等先, 看看以前的nginx的编译参数先:

root@47.105.73.242 ~/tengine-2.3.2$ nginx.bak -V
nginx version: nginx/1.14.0 (Ubuntu)
built with OpenSSL 1.1.1  11 Sep 2018
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-DUghaW/nginx-1.14.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module

把安装的模块copy下,整:

root@47.105.73.242 ~$  cd tengine-2.3.2/
root@47.105.73.242 ~/tengine-2.3.2$  ./configure --with-http_gzip_static_module --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic --with-mail_ssl_module

报错不要怕, 缺啥lib 找Google 度娘啥的,一并解决了!

root@47.105.73.242 ~/tengine-2.3.2$ make&&make install

完事:

root@47.105.73.242 ~/tengine-2.3.2$ ll /usr/local/nginx/
total 44
drwx------ 2 www-data root 4096 Dec 12 15:33 client_body_temp/
drwxr-xr-x 2 root     root 4096 Dec 12 14:35 conf/
drwx------ 2 www-data root 4096 Dec 10 18:16 fastcgi_temp/
drwxr-xr-x 2 root     root 4096 Dec 10 18:13 html/
drwxr-xr-x 2 root     root 4096 Dec 10 18:13 include/
drwxr-xr-x 2 root     root 4096 Dec 10 18:58 logs/
drwxr-xr-x 2 root     root 4096 Dec 10 21:27 modules/
drwx------ 2 www-data root 4096 Dec 10 18:16 proxy_temp/
drwxr-xr-x 2 root     root 4096 Dec 10 21:27 sbin/
drwx------ 2 www-data root 4096 Dec 10 18:16 scgi_temp/
drwx------ 2 www-data root 4096 Dec 10 18:16 uwsgi_temp/

把原来的nginx改个名:

mv /usr/sbin/nginx /usr/sbin/nginx.bak

做个link:

ln -s /usr/local/nginx/sbin/nginx /usr/sbin/

结果呢:

Tengine的配置文件改个名:

mv /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.bak

配置文件再来个link,用以前的nginx配置文件

ln -s /etc/nginx/nginx.conf /usr/local/nginx/conf/

完事:

service nginx restart

喏:

 

 

 

齐活, 没有修改任何的配置, 直接使用原有的nginx配置

更多详细信息,姿势技巧  http://tengine.taobao.org/

4
0
Tags
富强,民主,文明,和谐,自由,平等,公正,法治,爱国,敬业,诚信,友善。
打赏二维码