{"id":18160,"date":"2014-01-17T07:09:13","date_gmt":"2014-01-16T23:09:13","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/01\/17\/%e5%9c%a8-centos-6-x-%e5%ae%89%e8%a3%9d-nginx-light-web-server\/"},"modified":"2021-03-18T17:23:48","modified_gmt":"2021-03-18T09:23:48","slug":"%e5%9c%a8-centos-6-x-%e5%ae%89%e8%a3%9d-nginx-light-web-server","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/01\/17\/%e5%9c%a8-centos-6-x-%e5%ae%89%e8%a3%9d-nginx-light-web-server\/","title":{"rendered":"\u5728 CentOS 6.x \u5b89\u88dd Nginx Light Web Server"},"content":{"rendered":"<p>Nginx \u662f\u4e00\u5957\u8f15\u91cf\u7d1a\u7684 Web Server\uff0c\u548c Apache Web Server \u6bd4\u8d77\u4f86\uff0c\u7531\u4fc4\u7f85\u65af\u7a0b\u5f0f\u8a2d\u8a08\u5e2b Igor Sysoev \u6240\u958b\u767c\u8f15\u91cf\u7d1a\u7684\u7db2\u9801\u4f3a\u670d\u5668\uff0c\u8edf\u9ad4\u4ee5 BSD-like \u6388\u6b0a\uff0c\u53ef\u4ee5\u5728 UNIX\u3001GNU\/Linux\u3001BSD\u3001Mac OS X\u3001Solaris\uff0c\u4ee5\u53caMicrosoft Windows \u7b49\u4f5c\u696d\u7cfb\u7d71\u4e2d\u57f7\u884c\u3002<br \/><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-2345725.gif\" alt=\"\" \/><br \/>Nginx \u5b98\u65b9\u7db2\u7ad9\uff1a<a href=\"http:\/\/nginx.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/nginx.org\/<\/a><\/p>\n<p>\u76ee\u524d\u6709\u4eba\u5728 Linux \u4f7f\u7528\u5b83\u4f86\u53d6\u4ee3 Apache Web Server\uff0c\u4e26\u628a\u9019\u500b\u7d44\u5408\u7a31\u70ba LNMP(Linux + Nginx + MySQL + PHP)[@more@]\u5b89\u88dd\u65b9\u5f0f\uff1a<br \/>\u56e0\u70ba Nginx \u4e26\u4e0d\u662f CentOS \u5b98\u65b9\u5957\u4ef6\uff0c\u6240\u4ee5\u5fc5\u9808\u5148\u65b0\u589e Nginx \u5b98\u65b9\u6240\u63d0\u4f9b\u7684\u7b2c\u4e09\u65b9\u5957\u4ef6\u5eab<br \/># <span style=\"color: #ff0000\">vim \/etc\/yum.repos.d\/nginx.repo<\/span><br \/><span style=\"color: #0000ff\">[nginx]<\/span><br \/><span style=\"color: #0000ff\">name=nginx repo<\/span><br \/><span style=\"color: #0000ff\">baseurl=http:\/\/nginx.org\/packages\/centos\/$releasever\/$basearch\/<\/span><br \/><span style=\"color: #0000ff\">gpgcheck=0<\/span><br \/><span style=\"color: #0000ff\">enabled=1<\/span><\/p>\n<p>\u532f\u5165\u6191\u8b49<br \/># <span style=\"color: #ff0000\">rpm &#8211;import http:\/\/nginx.org\/keys\/nginx_signing.key<\/span><\/p>\n<p>\u6216<br \/># <span style=\"color: #ff0000\">wget http:\/\/nginx.org\/packages\/centos\/6\/noarch\/RPMS\/nginx-release-centos-6-0.el6.ngx.noarch.rpm<\/span><br \/># <span style=\"color: #ff0000\">rpm -ivh http:\/\/nginx.org\/packages\/centos\/6\/noarch\/RPMS\/nginx-release-centos-6-0.el6.ngx.noarch.rpm<\/span><\/p>\n<p>\u66f4\u65b0\u5957\u4ef6\u5eab<br \/># <span style=\"color: #ff0000\">yum update<\/span><\/p>\n<p>\u5b89\u88dd Nginx Web Server<br \/># <span style=\"color: #ff0000\">yum install nginx<\/span><\/p>\n<p>\u57f7\u884c Nginx Web Server<br \/># <span style=\"color: #ff0000\">service nginx start<\/span><br \/><span style=\"color: #0000ff\">Starting nginx:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 [\u00a0 OK\u00a0 ]<\/span><\/p>\n<p>\u8a2d\u5b9a\u958b\u6a5f\u9810\u8a2d\u555f\u52d5 Nginx \u548c\u95dc\u9589 Apache Web Server<br \/># <span style=\"color: #ff0000\">chkconfig &#8211;level 3 nginx on<\/span><br \/># <span style=\"color: #ff0000\">chkconfig &#8211;level 3 httpd off<\/span><\/p>\n<p>\u958b\u555f\u700f\u89bd\u5668\uff0c\u9023\u7dda\u5230 Nginx Web Server<br \/><a id=\"res_2345726\" href=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/25793-2345726.png\"><img decoding=\"async\" src=\"https:\/\/2blog.ilc.edu.tw\/wp-content\/uploads\/sites\/985\/25793\/previews-med\/25793-2345726.png\" border=\"0\" alt=\"\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nginx \u662f\u4e00\u5957\u8f15\u91cf\u7d1a\u7684 Web Server\uff0c\u548c Apache Web Server \u6bd4\u8d77\u4f86\uff0c\u7531\u4fc4\u7f85\u65af\u7a0b\u5f0f &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/01\/17\/%e5%9c%a8-centos-6-x-%e5%ae%89%e8%a3%9d-nginx-light-web-server\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008\u5728 CentOS 6.x \u5b89\u88dd Nginx Light Web Server\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117,137],"tags":[],"class_list":["post-18160","post","type-post","status-publish","format-standard","hentry","category-c-78462","category-c-78482"],"meta_key":{"_encloseme":["1"],"lt_post_id":["468996"],"_pingme":["1"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18160"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=18160"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18160\/revisions"}],"predecessor-version":[{"id":19834,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18160\/revisions\/19834"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=18160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=18160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=18160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}