{"id":113,"date":"2023-04-20T09:22:12","date_gmt":"2023-04-20T01:22:12","guid":{"rendered":"http:\/\/esufy.com\/?p=113"},"modified":"2024-03-10T15:38:55","modified_gmt":"2024-03-10T07:38:55","slug":"linux%e4%b8%8b%e5%ae%89%e8%a3%85nginx-2","status":"publish","type":"post","link":"http:\/\/www.esufy.cn\/?p=113","title":{"rendered":"Linux\u4e0b\u5b89\u88c5Nginx"},"content":{"rendered":"<p>1\u3001gcc \u5b89\u88c5<br \/>\nyum install gcc-c++<\/p>\n<p>2\u3001PCRE pcre-devel \u5b89\u88c5<br \/>\nyum install -y pcre pcre-devel<\/p>\n<p>3\u3001zlib \u5b89\u88c5<br \/>\nyum install -y zlib zlib-devel<\/p>\n<p>4\u3001OpenSSL \u5b89\u88c5<br \/>\nyum install -y openssl openssl-devel<\/p>\n<p>5\u3001\u4e0b\u8f7d\u5b89\u88c5\u5305\uff0c\u5b98\u7f51\u5730\u5740\uff1ahttps:\/\/nginx.org\/en\/download.html<br \/>\nwget https:\/\/nginx.org\/download\/nginx-1.19.9.tar.gz<\/p>\n<p>6\u3001\u89e3\u538b\u5e76\u8fdb\u5165nginx\u76ee\u5f55<br \/>\n(1)\u4f7f\u7528\u9ed8\u8ba4\u914d\u7f6e\uff1a<br \/>\n.\/configure<br \/>\n(2)\u81ea\u5b9a\u4e49\u914d\u7f6e\uff1a<br \/>\n\u6307\u5b9a\u5b89\u88c5\u76ee\u5f55\uff1a&#8211;prefix=\/usr\/local\/nginx<br \/>\n\u6dfb\u52a0ssl\u6a21\u5757\uff1a&#8211;with-http_ssl_module<br \/>\n\u663e\u793a\u5ba2\u6237\u7aef\u72b6\u6001\u6a21\u5757\uff1a&#8211;with-http_stub_status_module<br \/>\n\u652f\u6301TCP\u8f6c\u53d1\u6a21\u5757\uff1a&#8211;with-stream<br \/>\n.\/configure &#8211;prefix=\/usr\/local\/nginx &#8211;with-http_ssl_module &#8211;with-http_stub_status_module &#8211;with-stream &#8211;with-stream_ssl_module<\/p>\n<p>7\u3001\u7f16\u8bd1\u5b89\u88c5<br \/>\nmake<br \/>\nmake install<\/p>\n<p>8\u3001\u67e5\u627e\u5b89\u88c5\u8def\u5f84<br \/>\nwhereis nginx<\/p>\n<p>9\u3001\u76f8\u5173\u547d\u4ee4<br \/>\n.\/nginx<br \/>\n.\/nginx -s stop \u6b64\u65b9\u5f0f\u76f8\u5f53\u4e8e\u5148\u67e5\u51fanginx\u8fdb\u7a0bid\u518d\u4f7f\u7528kill\u547d\u4ee4\u5f3a\u5236\u6740\u6389\u8fdb\u7a0b<br \/>\n.\/nginx -s quit \u6b64\u65b9\u5f0f\u505c\u6b62\u6b65\u9aa4\u662f\u5f85nginx\u8fdb\u7a0b\u5904\u7406\u4efb\u52a1\u5b8c\u6bd5\u8fdb\u884c\u505c\u6b62<br \/>\n.\/nginx -s reload<\/p>\n<p>10\u3001\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\u52a8<br \/>\nvi \/etc\/rc.local<br \/>\n\u589e\u52a0\u4e00\u884c \/usr\/local\/nginx\/sbin\/nginx<br \/>\n\u8bbe\u7f6e\u6267\u884c\u6743\u9650\uff1achmod 755 rc.local<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001gcc \u5b89\u88c5 yum install gcc-c++ 2\u3001PCRE pcre-devel \u5b89\u88c5 yum i [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":309,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[24],"tags":[11],"_links":{"self":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts\/113"}],"collection":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=113"}],"version-history":[{"count":1,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":114,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/posts\/113\/revisions\/114"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=\/wp\/v2\/media\/309"}],"wp:attachment":[{"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.esufy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}