Site updated: 2022-11-30 17:26:33
This commit is contained in:
parent
8ac1f34448
commit
8f7e7bb1bb
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
9
atom.xml
9
atom.xml
@ -22,7 +22,9 @@
|
||||
<title>将nginx替换为tengine</title>
|
||||
<link rel="alternate" href="https://blog.jingxiyuan.cn/2022/11/30/%E5%B0%86nginx%E6%9B%BF%E6%8D%A2%E4%B8%BAtengine/"/>
|
||||
<content type="html"><h4 id="介绍"><a class="anchor" href="#介绍">#</a> 介绍</h4>
|
||||
<div class="note infoTengine的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的Web平台。从2011年12月开始,Tengine成为一个开源项目。现在,它由Tengine团队开发和维护。Tengine团队的核心成员来自于淘宝、搜狗等互联网企业。:::">
|
||||
<div class="note info">
|
||||
<p>Tengine 的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的 Web 平台。从 2011 年 12 月开始,Tengine 成为一个开源项目。现在,它由 Tengine 团队开发和维护。Tengine 团队的核心成员来自于淘宝、搜狗等互联网企业。</p>
|
||||
</div>
|
||||
<p>tengine 简单来说就是淘宝自己基于 nginx 优化的网页引擎,在 nginx 原先基础上继续保持兼容,同时功能扩展,效率提高,可以看到目前淘宝网在这么多人同时使用的情况下依然稳定,我们足以相信 tengine,由于它是 nginx 的一个分生版本,所以几乎完全兼容 nginx,所以我认为 tengine 是搭建 lnmp 环境的不二之选。</p>
|
||||
<h4 id="下载"><a class="anchor" href="#下载">#</a> 下载</h4>
|
||||
<p>首先访问<span class="exturl" data-url="aHR0cDovL3RlbmdpbmUudGFvYmFvLm9yZy8="> tengine 官方网站</span>,获取最新的下载地址。<br />
|
||||
@ -45,7 +47,6 @@
|
||||
<h4 id="测试"><a class="anchor" href="#测试">#</a> 测试</h4>
|
||||
<p><code>nginx -t</code> 如果打印 test is successful 则表示替换成功。<br />
|
||||
然后执行 service nginx start 进行启动即可</p>
|
||||
</div>
|
||||
</content>
|
||||
<category term="Linux" scheme="https://blog.jingxiyuan.cn/categories/Linux/" />
|
||||
<category term="服务" scheme="https://blog.jingxiyuan.cn/categories/Linux/%E6%9C%8D%E5%8A%A1/" />
|
||||
@ -84,8 +85,8 @@
|
||||
<category term="服务" scheme="https://blog.jingxiyuan.cn/categories/Linux/%E6%9C%8D%E5%8A%A1/" />
|
||||
<category term="Nginx" scheme="https://blog.jingxiyuan.cn/categories/Linux/%E6%9C%8D%E5%8A%A1/Nginx/" />
|
||||
<category term="Nginx" scheme="https://blog.jingxiyuan.cn/tags/Nginx/" />
|
||||
<category term="动态域名解析" scheme="https://blog.jingxiyuan.cn/tags/%E5%8A%A8%E6%80%81%E5%9F%9F%E5%90%8D%E8%A7%A3%E6%9E%90/" />
|
||||
<category term="Tengine" scheme="https://blog.jingxiyuan.cn/tags/Tengine/" />
|
||||
<category term="动态域名解析" scheme="https://blog.jingxiyuan.cn/tags/%E5%8A%A8%E6%80%81%E5%9F%9F%E5%90%8D%E8%A7%A3%E6%9E%90/" />
|
||||
<updated>2022-11-30T08:35:00.000Z</updated>
|
||||
</entry>
|
||||
<entry>
|
||||
@ -99,8 +100,8 @@
|
||||
<category term="服务" scheme="https://blog.jingxiyuan.cn/categories/Linux/%E6%9C%8D%E5%8A%A1/" />
|
||||
<category term="Nginx" scheme="https://blog.jingxiyuan.cn/categories/Linux/%E6%9C%8D%E5%8A%A1/Nginx/" />
|
||||
<category term="Nginx" scheme="https://blog.jingxiyuan.cn/tags/Nginx/" />
|
||||
<category term="Tengine" scheme="https://blog.jingxiyuan.cn/tags/Tengine/" />
|
||||
<category term="stream" scheme="https://blog.jingxiyuan.cn/tags/stream/" />
|
||||
<category term="Tengine" scheme="https://blog.jingxiyuan.cn/tags/Tengine/" />
|
||||
<updated>2022-11-30T08:09:00.000Z</updated>
|
||||
</entry>
|
||||
<entry>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
10
feed.json
10
feed.json
@ -11,7 +11,7 @@
|
||||
"url": "https://blog.jingxiyuan.cn/2022/11/30/%E5%B0%86nginx%E6%9B%BF%E6%8D%A2%E4%B8%BAtengine/",
|
||||
"title": "将nginx替换为tengine",
|
||||
"date_published": "2022-11-30T09:05:00.000Z",
|
||||
"content_html": "<h4 id=\"介绍\"><a class=\"anchor\" href=\"#介绍\">#</a> 介绍</h4>\n<div class=\"note infoTengine的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的Web平台。从2011年12月开始,Tengine成为一个开源项目。现在,它由Tengine团队开发和维护。Tengine团队的核心成员来自于淘宝、搜狗等互联网企业。:::\">\n<p>tengine 简单来说就是淘宝自己基于 nginx 优化的网页引擎,在 nginx 原先基础上继续保持兼容,同时功能扩展,效率提高,可以看到目前淘宝网在这么多人同时使用的情况下依然稳定,我们足以相信 tengine,由于它是 nginx 的一个分生版本,所以几乎完全兼容 nginx,所以我认为 tengine 是搭建 lnmp 环境的不二之选。</p>\n<h4 id=\"下载\"><a class=\"anchor\" href=\"#下载\">#</a> 下载</h4>\n<p>首先访问<span class=\"exturl\" data-url=\"aHR0cDovL3RlbmdpbmUudGFvYmFvLm9yZy8=\"> tengine 官方网站</span>,获取最新的下载地址。<br />\n <code>wget http://tengine.taobao.org/download/tengine-2.3.3.tar.gz</code></p>\n<h4 id=\"获取编译参数\"><a class=\"anchor\" href=\"#获取编译参数\">#</a> 获取编译参数</h4>\n<p><code>nginx -V</code></p>\n<h4 id=\"编译\"><a class=\"anchor\" href=\"#编译\">#</a> 编译</h4>\n<p><code>./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with-http_gzip_static_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_uwsgi_module --without-http_scgi_module</code> <br />\n./configure 后面的参数是上一步获取的</p>\n<h4 id=\"make\"><a class=\"anchor\" href=\"#make\">#</a> Make</h4>\n<p><code>make 或者 make -j 内核数</code> <br />\n生成的文件在 objs 目录下</p>\n<h4 id=\"替换\"><a class=\"anchor\" href=\"#替换\">#</a> 替换</h4>\n<p>停止 nginx 服务 <code>service nginx stop</code> <br />\n 查看 nginx 目录 <code>whereis nginx</code> <br />\n 备份旧 nginx <code>mv /usr/sbin/nginx /usr/sbin/nginx.old</code> <br />\n 拷贝 objs 下的 nginx 替换旧 nginx <code>cp ./objs/nginx /usr/sbin/</code> <br />\n 备份旧 so 文件<br />\n拷贝 objs 下的 so 文件替换旧的 so 文件 <code>cp ./objs/*.so /usr/lib/nginx/modules/</code></p>\n<h4 id=\"测试\"><a class=\"anchor\" href=\"#测试\">#</a> 测试</h4>\n<p><code>nginx -t</code> 如果打印 test is successful 则表示替换成功。<br />\n然后执行 service nginx start 进行启动即可</p>\n</div>\n",
|
||||
"content_html": "<h4 id=\"介绍\"><a class=\"anchor\" href=\"#介绍\">#</a> 介绍</h4>\n<div class=\"note info\">\n<p>Tengine 的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的 Web 平台。从 2011 年 12 月开始,Tengine 成为一个开源项目。现在,它由 Tengine 团队开发和维护。Tengine 团队的核心成员来自于淘宝、搜狗等互联网企业。</p>\n</div>\n<p>tengine 简单来说就是淘宝自己基于 nginx 优化的网页引擎,在 nginx 原先基础上继续保持兼容,同时功能扩展,效率提高,可以看到目前淘宝网在这么多人同时使用的情况下依然稳定,我们足以相信 tengine,由于它是 nginx 的一个分生版本,所以几乎完全兼容 nginx,所以我认为 tengine 是搭建 lnmp 环境的不二之选。</p>\n<h4 id=\"下载\"><a class=\"anchor\" href=\"#下载\">#</a> 下载</h4>\n<p>首先访问<span class=\"exturl\" data-url=\"aHR0cDovL3RlbmdpbmUudGFvYmFvLm9yZy8=\"> tengine 官方网站</span>,获取最新的下载地址。<br />\n <code>wget http://tengine.taobao.org/download/tengine-2.3.3.tar.gz</code></p>\n<h4 id=\"获取编译参数\"><a class=\"anchor\" href=\"#获取编译参数\">#</a> 获取编译参数</h4>\n<p><code>nginx -V</code></p>\n<h4 id=\"编译\"><a class=\"anchor\" href=\"#编译\">#</a> 编译</h4>\n<p><code>./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with-http_gzip_static_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --without-http_uwsgi_module --without-http_scgi_module</code> <br />\n./configure 后面的参数是上一步获取的</p>\n<h4 id=\"make\"><a class=\"anchor\" href=\"#make\">#</a> Make</h4>\n<p><code>make 或者 make -j 内核数</code> <br />\n生成的文件在 objs 目录下</p>\n<h4 id=\"替换\"><a class=\"anchor\" href=\"#替换\">#</a> 替换</h4>\n<p>停止 nginx 服务 <code>service nginx stop</code> <br />\n 查看 nginx 目录 <code>whereis nginx</code> <br />\n 备份旧 nginx <code>mv /usr/sbin/nginx /usr/sbin/nginx.old</code> <br />\n 拷贝 objs 下的 nginx 替换旧 nginx <code>cp ./objs/nginx /usr/sbin/</code> <br />\n 备份旧 so 文件<br />\n拷贝 objs 下的 so 文件替换旧的 so 文件 <code>cp ./objs/*.so /usr/lib/nginx/modules/</code></p>\n<h4 id=\"测试\"><a class=\"anchor\" href=\"#测试\">#</a> 测试</h4>\n<p><code>nginx -t</code> 如果打印 test is successful 则表示替换成功。<br />\n然后执行 service nginx start 进行启动即可</p>\n",
|
||||
"tags": [
|
||||
"Linux",
|
||||
"服务",
|
||||
@ -31,8 +31,8 @@
|
||||
"服务",
|
||||
"Nginx",
|
||||
"Nginx",
|
||||
"动态域名解析",
|
||||
"Tengine"
|
||||
"Tengine",
|
||||
"动态域名解析"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -46,8 +46,8 @@
|
||||
"服务",
|
||||
"Nginx",
|
||||
"Nginx",
|
||||
"Tengine",
|
||||
"stream"
|
||||
"stream",
|
||||
"Tengine"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
9
rss.xml
9
rss.xml
@ -31,7 +31,9 @@
|
||||
<category term="Tengine" scheme="https://blog.jingxiyuan.cn/tags/Tengine/" />
|
||||
<pubDate>Wed, 30 Nov 2022 17:05:00 +0800</pubDate>
|
||||
<description><![CDATA[ <h4 id="介绍"><a class="anchor" href="#介绍">#</a> 介绍</h4>
|
||||
<div class="note infoTengine的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的Web平台。从2011年12月开始,Tengine成为一个开源项目。现在,它由Tengine团队开发和维护。Tengine团队的核心成员来自于淘宝、搜狗等互联网企业。:::">
|
||||
<div class="note info">
|
||||
<p>Tengine 的性能和稳定性已经在大型的网站如淘宝网,天猫商城等得到了很好的检验。它的最终目标是打造一个高效、稳定、安全、易用的 Web 平台。从 2011 年 12 月开始,Tengine 成为一个开源项目。现在,它由 Tengine 团队开发和维护。Tengine 团队的核心成员来自于淘宝、搜狗等互联网企业。</p>
|
||||
</div>
|
||||
<p>tengine 简单来说就是淘宝自己基于 nginx 优化的网页引擎,在 nginx 原先基础上继续保持兼容,同时功能扩展,效率提高,可以看到目前淘宝网在这么多人同时使用的情况下依然稳定,我们足以相信 tengine,由于它是 nginx 的一个分生版本,所以几乎完全兼容 nginx,所以我认为 tengine 是搭建 lnmp 环境的不二之选。</p>
|
||||
<h4 id="下载"><a class="anchor" href="#下载">#</a> 下载</h4>
|
||||
<p>首先访问<span class="exturl" data-url="aHR0cDovL3RlbmdpbmUudGFvYmFvLm9yZy8="> tengine 官方网站</span>,获取最新的下载地址。<br />
|
||||
@ -54,7 +56,6 @@
|
||||
<h4 id="测试"><a class="anchor" href="#测试">#</a> 测试</h4>
|
||||
<p><code>nginx -t</code> 如果打印 test is successful 则表示替换成功。<br />
|
||||
然后执行 service nginx start 进行启动即可</p>
|
||||
</div>
|
||||
]]></description>
|
||||
</item>
|
||||
<item>
|
||||
@ -65,8 +66,8 @@
|
||||
<category term="服务" scheme="https://blog.jingxiyuan.cn/categories/Linux/%E6%9C%8D%E5%8A%A1/" />
|
||||
<category term="Nginx" scheme="https://blog.jingxiyuan.cn/categories/Linux/%E6%9C%8D%E5%8A%A1/Nginx/" />
|
||||
<category term="Nginx" scheme="https://blog.jingxiyuan.cn/tags/Nginx/" />
|
||||
<category term="动态域名解析" scheme="https://blog.jingxiyuan.cn/tags/%E5%8A%A8%E6%80%81%E5%9F%9F%E5%90%8D%E8%A7%A3%E6%9E%90/" />
|
||||
<category term="Tengine" scheme="https://blog.jingxiyuan.cn/tags/Tengine/" />
|
||||
<category term="动态域名解析" scheme="https://blog.jingxiyuan.cn/tags/%E5%8A%A8%E6%80%81%E5%9F%9F%E5%90%8D%E8%A7%A3%E6%9E%90/" />
|
||||
<pubDate>Wed, 30 Nov 2022 16:35:00 +0800</pubDate>
|
||||
<description><![CDATA[ <h4 id="应用场景"><a class="anchor" href="#应用场景">#</a> 应用场景:</h4>
|
||||
<p>由于有时候 nginx 代理的时候,第三方域名对应的 ip 可能发生变化,然而没有提前通知,然而如果不配置什么,nginx 又不能智能解析,因此 nginx 动态解析域名就比较重要。</p>
|
||||
@ -99,8 +100,8 @@
|
||||
<category term="服务" scheme="https://blog.jingxiyuan.cn/categories/Linux/%E6%9C%8D%E5%8A%A1/" />
|
||||
<category term="Nginx" scheme="https://blog.jingxiyuan.cn/categories/Linux/%E6%9C%8D%E5%8A%A1/Nginx/" />
|
||||
<category term="Nginx" scheme="https://blog.jingxiyuan.cn/tags/Nginx/" />
|
||||
<category term="Tengine" scheme="https://blog.jingxiyuan.cn/tags/Tengine/" />
|
||||
<category term="stream" scheme="https://blog.jingxiyuan.cn/tags/stream/" />
|
||||
<category term="Tengine" scheme="https://blog.jingxiyuan.cn/tags/Tengine/" />
|
||||
<pubDate>Wed, 30 Nov 2022 16:09:00 +0800</pubDate>
|
||||
<description><![CDATA[ <h4 id="引言"><a class="anchor" href="#引言">#</a> 引言</h4>
|
||||
<p>stream 模块一般用于 TCP/UDP 数据流的代理和负载均衡,可以通过 stream 模块代理转发 TCP 消息。我是用来转发 mysql、gitee 等连接的,结果有天 ip 发生了变动导致连接不上。前期试过配置<span class="blue"> resolver 114.114.114.114 valid=60s;</span> 来动态解析域名,结果 stream 模块不支持 set 函数,这就导致 ip 变动后必须手动重启或者 reload 一下 nginx 才能正常连接。后面经过搜索发现有人说用 Tengine 替代 nginx 可以实现就试了试,结果发现<span class="red"> Tengine 只能实现 http 下的动态域名解析</span>,至此问题依旧。没办法,我只能通过定时任务加脚本判断 ip 是否变动,如果变动就 reload 一下 nginx。</p>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user