{"id":4830,"date":"2021-01-15T00:25:39","date_gmt":"2021-01-14T16:25:39","guid":{"rendered":"http:\/\/www.menglanglang.cn\/?p=4830"},"modified":"2022-09-16T05:50:19","modified_gmt":"2022-09-15T21:50:19","slug":"centos-%e9%80%9a%e8%bf%87%e6%ba%90%e7%a0%81%e7%bc%96%e8%af%91%e5%bd%a2%e5%bc%8f%e5%ae%89%e8%a3%85-tengine","status":"publish","type":"post","link":"http:\/\/www.menglanglang.cn\/?p=4830","title":{"rendered":"CentOS \u901a\u8fc7\u6e90\u7801\u7f16\u8bd1\u5f62\u5f0f\u5b89\u88c5 Tengine"},"content":{"rendered":"\n<p>\u672c\u7bc7\u7b80\u5355\u8bf4\u8bf4\u5728\u5982\u4f55\u5728 Linux \u7cfb\u7edf\u4e0a\u901a\u8fc7\u6e90\u7801\u7f16\u8bd1\u7684\u5f62\u5f0f\u5b89\u88c5 Tengine\uff0c\u7eaf\u5c5e\u7b14\u8bb0\u3002<\/p>\n\n\n\n<p>\u524d\u4e00\u7bc7\u5199\u4e86\u300a<a href=\"http:\/\/www.menglanglang.cn\/blog-post\/computer-technology\/it-development\/operating-system\/linux\/4827\/\">CentOS \u901a\u8fc7\u6e90\u7801\u7f16\u8bd1\u5f62\u5f0f\u5b89\u88c5 Nginx<\/a>\u300b\uff0c\u5176\u5b9e Tengine \u662f\u7531\u6dd8\u5b9d\u7f51\u53d1\u8d77\u7684 Web \u670d\u52a1\u5668\u9879\u76ee\u3002\u5b83\u5728 Nginx \u7684\u57fa\u7840\u4e0a\uff0c\u9488\u5bf9\u5927\u8bbf\u95ee\u91cf\u7f51\u7ad9\u7684\u9700\u6c42\uff0c\u6dfb\u52a0\u4e86\u5f88\u591a\u9ad8\u7ea7\u529f\u80fd\u548c\u7279\u6027\u3002Tengine \u7684\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u5df2\u7ecf\u5728\u5927\u578b\u7684\u7f51\u7ad9\u5982\u6dd8\u5b9d\u7f51\uff0c\u5929\u732b\u5546\u57ce\u7b49\u5f97\u5230\u4e86\u5f88\u597d\u7684\u68c0\u9a8c\u3002\u5b83\u7684\u6700\u7ec8\u76ee\u6807\u662f\u6253\u9020\u4e00\u4e2a\u9ad8\u6548\u3001\u7a33\u5b9a\u3001\u5b89\u5168\u3001\u6613\u7528\u7684 Web \u5e73\u53f0\u3002\u4ece 2011 \u5e74 12 \u6708\u5f00\u59cb\uff0cTengine \u6210\u4e3a\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0cTengine \u56e2\u961f\u5728\u79ef\u6781\u5730\u5f00\u53d1\u548c\u7ef4\u62a4\u7740\u5b83\u3002Tengine \u56e2\u961f\u7684\u6838\u5fc3\u6210\u5458\u6765\u81ea\u4e8e\u6dd8\u5b9d\u3001\u641c\u72d7\u7b49\u4e92\u8054\u7f51\u4f01\u4e1a\u3002Tengine \u662f\u793e\u533a\u5408\u4f5c\u7684\u6210\u679c\uff0c\u6211\u4eec\u6b22\u8fce\u5927\u5bb6\u53c2\u4e0e\u5176\u4e2d\uff0c\u8d21\u732e\u81ea\u5df1\u7684\u529b\u91cf\u3002<\/p>\n\n\n\n<p>Tengine \u5b98\u7f51\u8def\u5f84\uff1a<a href=\"http:\/\/tengine.taobao.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/tengine.taobao.org\/<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u90e8\u7f72\u73af\u5883<\/h3>\n\n\n\n<p>Linux \u7248\u672c\uff1acentos6.9-x64<\/p>\n\n\n\n<p>Tengine \u7248\u672c\uff1atengine-2.3.2.tar.gz<\/p>\n\n\n\n<p>\u5173\u95ed Linux \u673a\u5668\u9632\u706b\u5899<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e00\u6b65\uff0c\u4e0a\u4f20\u5b89\u88c5\u5305<\/h3>\n\n\n\n<p>\u4e0a\u4f20 Tengine \u5b89\u88c5\u5305&nbsp;tengine-2.3.2.tar.gz\uff0c\u8fd9\u91cc\u4e0a\u4f20\u5230 \/root \u4e0b\u3002<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" height=\"203\" width=\"752\" alt=\"\" src=\"\/\/images.weserv.nl\/?url=https:\/\/img-blog.csdnimg.cn\/20210114235835507.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3R6aHV3Yg==,size_16,color_FFFFFF,t_70\"\/><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e8c\u6b65\uff0c\u89e3\u538b\u5b89\u88c5\u5305<\/h3>\n\n\n\n<p>\u5bf9\u7b2c\u4e00\u6b65\u4e0a\u4f20\u7684\u5b89\u88c5\u5305\u8fdb\u884c\u89e3\u538b\u5e76\u8fdb\u5165\u5230\u89e3\u538b\u76ee\u5f55\uff0c\u547d\u4ee4\u5982\u4e0b\u3002<\/p>\n\n\n\n<p>\u547d\u4ee41\uff1atar -zxvf tengine-2.3.2.tar.gz<\/p>\n\n\n\n<p>\u547d\u4ee42\uff1acd tengine-2.3.2<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" height=\"74\" width=\"614\" alt=\"\" src=\"\/\/images.weserv.nl\/?url=https:\/\/img-blog.csdnimg.cn\/20210115000015837.png\"\/><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e09\u6b65\uff0c\u68c0\u67e5\u5b89\u88c5\u4f9d\u8d56<\/h3>\n\n\n\n<p>\u8fd9\u91cc\u8ba1\u5212\u628a Nginx \u5b89\u88c5\u5230 \/usr\/local \u4e0b\uff0c\u68c0\u67e5\u4f9d\u8d56\u547d\u4ee4\u5982\u4e0b\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>.\/configure \\<br \/>--prefix=\/usr\/local\/tengine\/ \\<br \/>--error-log-path=\/var\/log\/tengine\/error.log \\<br \/>--http-log-path=\/var\/log\/tengine\/access.log \\<br \/>--pid-path=\/var\/run\/tengine\/tengine.pid \\<br \/>--lock-path=\/var\/lock\/tengine.lock \\<br \/>--with-http_ssl_module \\<br \/>--with-http_flv_module \\<br \/>--with-http_stub_status_module \\<br \/>--with-http_gzip_static_module \\<br \/>--http-client-body-temp-path=\/var\/tmp\/tengine\/client\/ \\<br \/>--http-proxy-temp-path=\/var\/tmp\/tengine\/proxy\/ \\<br \/>--http-fastcgi-temp-path=\/var\/tmp\/tengine\/fcgi\/ \\<br \/>--http-uwsgi-temp-path=\/var\/tmp\/tengine\/uwsgi \\<br \/>--http-scgi-temp-path=\/var\/tmp\/tengine\/scgi \\<br \/>--with-pcre<\/p><\/blockquote>\n\n\n\n<p>\u7ed3\u679c\u4fe1\u606f\u5982\u4e0b\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>checking for OS<br \/>&nbsp;+ Linux 2.6.32-696.el6.x86_64 x86_64<br \/>checking for C compiler ... not found<\/p><p>.\/configure: error: C compiler cc is not found<\/p><\/blockquote>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" height=\"149\" width=\"677\" alt=\"\" src=\"\/\/images.weserv.nl\/?url=https:\/\/img-blog.csdnimg.cn\/20210114230814588.png\"\/><\/p>\n\n\n\n<p>\u8bf4\u660e\u7f3a\u5c11 C \u7f16\u8bd1\u73af\u5883\uff0c\u6267\u884c\u4e0b\u9762\u547d\u4ee4\u5b89\u88c5\u76f8\u5173\u73af\u5883\u5305\u3002<\/p>\n\n\n\n<p>\u547d\u4ee4\uff1ayum -y install gcc gcc-c++<\/p>\n\n\n\n<p>\u518d\u6b21\u6267\u884c\u68c0\u67e5\u4f9d\u8d56\u547d\u4ee4\uff0c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>[root@test242 nginx-1.19.6]# .\/configure \\<br \/>&gt; --prefix=\/usr\/local\/tengine\/ \\<br \/>&gt; --error-log-path=\/var\/log\/tengine\/error.log \\<br \/>&gt; --http-log-path=\/var\/log\/tengine\/access.log \\<br \/>&gt; --pid-path=\/var\/run\/tengine\/tengine.pid \\<br \/>&gt; --lock-path=\/var\/lock\/tengine.lock \\<br \/>&gt; --with-http_ssl_module \\<br \/>&gt; --with-http_flv_module \\<br \/>&gt; --with-http_stub_status_module \\<br \/>&gt; --with-http_gzip_static_module \\<br \/>&gt; --http-client-body-temp-path=\/var\/tmp\/tengine\/client\/ \\<br \/>&gt; --http-proxy-temp-path=\/var\/tmp\/tengine\/proxy\/ \\<br \/>&gt; --http-fastcgi-temp-path=\/var\/tmp\/tengine\/fcgi\/ \\<br \/>&gt; --http-uwsgi-temp-path=\/var\/tmp\/tengine\/uwsgi \\<br \/>&gt; --http-scgi-temp-path=\/var\/tmp\/tengine\/scgi \\<br \/>&gt; --with-pcre<br \/>...<\/p><p>.\/configure: error: the HTTP rewrite module requires the PCRE library.<br \/>You can either disable the module by using --without-http_rewrite_module<br \/>option, or install the PCRE library into the system, or build the PCRE library<br \/>statically from the source with nginx by using --with-pcre=&lt;path&gt; option.<\/p><p>[root@test242 nginx-1.19.6]#&nbsp;<\/p><\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u56db\u6b65\uff0c\u5b89\u88c5 pcre<\/h3>\n\n\n\n<p>\u547d\u4ee4\uff1ayum -y install pcre-devel<\/p>\n\n\n\n<p>\u518d\u6b21\u6267\u884c\u68c0\u67e5\u4f9d\u8d56\u547d\u4ee4\uff0c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>[root@test242 tengine-2.3.2]# .\/configure \\<br \/>&gt; --prefix=\/usr\/local\/tengine\/ \\<br \/>&gt; --error-log-path=\/var\/log\/tengine\/error.log \\<br \/>&gt; --http-log-path=\/var\/log\/tengine\/access.log \\<br \/>&gt; --pid-path=\/var\/run\/tengine\/tengine.pid \\<br \/>&gt; --lock-path=\/var\/lock\/tengine.lock \\<br \/>&gt; --with-http_ssl_module \\<br \/>&gt; --with-http_flv_module \\<br \/>&gt; --with-http_stub_status_module \\<br \/>&gt; --with-http_gzip_static_module \\<br \/>&gt; --http-client-body-temp-path=\/var\/tmp\/tengine\/client\/ \\<br \/>&gt; --http-proxy-temp-path=\/var\/tmp\/tengine\/proxy\/ \\<br \/>&gt; --http-fastcgi-temp-path=\/var\/tmp\/tengine\/fcgi\/ \\<br \/>&gt; --http-uwsgi-temp-path=\/var\/tmp\/tengine\/uwsgi \\<br \/>&gt; --http-scgi-temp-path=\/var\/tmp\/tengine\/scgi \\<br \/>&gt; --with-pcre<br \/>...<\/p><p>.\/configure: error: SSL modules require the OpenSSL library.<br \/>You can either do not enable the modules, or install the OpenSSL library<br \/>into the system, or build the OpenSSL library statically from the source<br \/>with nginx by using --with-openssl=&lt;path&gt; option.<\/p><p>[root@test242 tengine-2.3.2]#<\/p><\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e94\u6b65\uff0c\u5b89\u88c5 openssl<\/h3>\n\n\n\n<p>\u547d\u4ee4\uff1ayum -y install openssl-devel<\/p>\n\n\n\n<p>\u518d\u6b21\u6267\u884c\u68c0\u67e5\u4f9d\u8d56\u547d\u4ee4\uff0c\u53ef\u4ee5\u770b\u5230\u4e0d\u518d\u7f3a\u5c11\u4f9d\u8d56\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u516d\u6b65\uff0c\u7f16\u8bd1<\/h3>\n\n\n\n<p>\u547d\u4ee4\uff1amake<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e03\u6b65\uff0c\u5b89\u88c5<\/h3>\n\n\n\n<p>\u547d\u4ee4\uff1amake install<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u516b\u6b65\uff0c\u542f\u52a8<\/h3>\n\n\n\n<p>\u8fdb\u5165 Tengine \u7684\u5b89\u88c5\u76ee\u5f55 \/usr\/local\/tengine\uff0c\u5e76\u542f\u52a8 Nginx \u670d\u52a1\u3002<\/p>\n\n\n\n<p>\u547d\u4ee41\uff1acd \/usr\/local\/tengine\/<\/p>\n\n\n\n<p>\u547d\u4ee42\uff1a.\/sbin\/nginx<\/p>\n\n\n\n<p>\u62a5\u9519\u4fe1\u606f\u4e3a\uff1anginx: [emerg] mkdir() \"\/var\/tmp\/tengine\/client\/\" failed (2: No such file or directory)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e5d\u6b65\uff0c\u521b\u5efa\u76ee\u5f55<\/h3>\n\n\n\n<p>\u6309\u7167\u62a5\u9519\u8981\u6c42\u521b\u5efa\u76ee\u5f55<\/p>\n\n\n\n<p>\u547d\u4ee4\uff1amkdir -p \/var\/tmp\/tengine\/client<\/p>\n\n\n\n<p>\u518d\u6b21\u6267\u884c\u7b2c8\u6b65\u547d\u4ee42\u542f\u52a8 Tengine\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e5d\u6b65\uff0c\u6d4b\u8bd5<\/h3>\n\n\n\n<p>\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\uff1ahttp:\/\/\u673a\u5668IP:80 \u6d4b\u8bd5\u662f\u5426\u5b89\u88c5\u6210\u529f\u3002<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" height=\"347\" width=\"775\" alt=\"\" src=\"\/\/images.weserv.nl\/?url=https:\/\/img-blog.csdnimg.cn\/20210115001414872.png?x-oss-process=image\/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3R6aHV3Yg==,size_16,color_FFFFFF,t_70\"\/><\/p>\n\n\n\n<p>\u770b\u5230\u4e0a\u9762\u6d4b\u8bd5\u9875\uff0c\u8bf4\u660e Tengine \u5df2\u5b89\u88c5\u6210\u529f\u3002\u5982\u679c\u6253\u4e0d\u5f00\u4e0a\u9762\u9875\u9762\uff0c\u53ef\u80fd\u662f\u673a\u5668\u7684\u9632\u706b\u5899\u6ca1\u5173\uff0c\u5148\u5173\u95ed\u9632\u706b\u5899\u518d\u8fdb\u884c\u9a8c\u8bc1\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528\u547d\u4ee4\uff1aservice iptables stop  \u6216\u8005  systemctl stop firewalld<\/p>\n\n\n\n<p>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/blog.csdn.net\/tzhuwb\/article\/details\/112645295\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/blog.csdn.net\/tzhuwb\/article\/details\/112645295<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u7bc7\u7b80\u5355\u8bf4\u8bf4\u5728\u5982\u4f55\u5728 Linux \u7cfb\u7edf\u4e0a\u901a\u8fc7\u6e90\u7801\u7f16\u8bd1\u7684\u5f62\u5f0f\u5b89\u88c5 Tengine\uff0c\u7eaf\u5c5e\u7b14\u8bb0\u3002 \u524d\u4e00\u7bc7\u5199\u4e86\u300aCen [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[851],"tags":[354,602,719,836,877,183,262,214],"class_list":["post-4830","post","type-post","status-publish","format-standard","hentry","category-nginx","tag-centos","tag-linux","tag-nginx","tag-tengine","tag-877","tag-183","tag-262","tag-214"],"_links":{"self":[{"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/posts\/4830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4830"}],"version-history":[{"count":2,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/posts\/4830\/revisions"}],"predecessor-version":[{"id":4851,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=\/wp\/v2\/posts\/4830\/revisions\/4851"}],"wp:attachment":[{"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4830"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.menglanglang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}