{"id":187666,"date":"2024-11-11T16:10:22","date_gmt":"2024-11-11T08:10:22","guid":{"rendered":"https:\/\/server.hk\/cnblog\/187666\/"},"modified":"2024-11-11T16:10:23","modified_gmt":"2024-11-11T08:10:23","slug":"%e6%95%b8%e6%93%9a%e5%ba%ab%e4%bd%94%e7%94%a880%e7%ab%af%e5%8f%a3%ef%bc%8c%e5%a6%82%e4%bd%95%e8%a7%a3%e6%b1%ba%ef%bc%9f-%e6%95%b8%e6%93%9a%e5%ba%ab%e4%bd%94%e7%94%a880%e7%ab%af%e5%8f%a3","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/187666\/","title":{"rendered":"\u6578\u64da\u5eab\u4f54\u752880\u7aef\u53e3\uff0c\u5982\u4f55\u89e3\u6c7a\uff1f (\u6578\u64da\u5eab\u4f54\u752880\u7aef\u53e3)"},"content":{"rendered":"<h1 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e4%bd%94%e7%94%a880%e7%ab%af%e5%8f%a3%ef%bc%8c%e5%a6%82%e4%bd%95%e8%a7%a3%e6%b1%ba%ef%bc%9f-IGCOfdFWGA\">\u6578\u64da\u5eab\u4f54\u752880\u7aef\u53e3\uff0c\u5982\u4f55\u89e3\u6c7a\uff1f<\/h1>\n<p>\u5728\u7db2\u7d61\u670d\u52d9\u4e2d\uff0c80\u7aef\u53e3\u901a\u5e38\u7528\u65bcHTTP\u5354\u8b70\uff0c\u9019\u662f\u7db2\u9801\u4f3a\u670d\u5668\u7684\u9ed8\u8a8d\u7aef\u53e3\u3002\u7136\u800c\uff0c\u6709\u6642\u5019\u6578\u64da\u5eab\u670d\u52d9\u53ef\u80fd\u6703\u610f\u5916\u5730\u4f54\u7528\u9019\u500b\u7aef\u53e3\uff0c\u5c0e\u81f4\u7db2\u9801\u7121\u6cd5\u6b63\u5e38\u8a2a\u554f\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u6578\u64da\u5eab\u4f54\u752880\u7aef\u53e3\u7684\u539f\u56e0\u53ca\u5176\u89e3\u6c7a\u65b9\u6848\u3002<\/p>\n<h2 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e4%bd%94%e7%94%a880%e7%ab%af%e5%8f%a3%e7%9a%84%e5%8e%9f%e5%9b%a0-IGCOfdFWGA\">\u6578\u64da\u5eab\u4f54\u752880\u7aef\u53e3\u7684\u539f\u56e0<\/h2>\n<p>\u6578\u64da\u5eab\u4f54\u752880\u7aef\u53e3\u7684\u60c5\u6cc1\u4e26\u4e0d\u5e38\u898b\uff0c\u4f46\u53ef\u80fd\u7531\u4ee5\u4e0b\u5e7e\u500b\u539f\u56e0\u5f15\u8d77\uff1a<\/p>\n<ul>\n<li><strong>\u914d\u7f6e\u932f\u8aa4\uff1a<\/strong>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u6578\u64da\u5eab\u7684\u914d\u7f6e\u6587\u4ef6\u53ef\u80fd\u88ab\u932f\u8aa4\u5730\u8a2d\u7f6e\u70ba\u4f7f\u752880\u7aef\u53e3\u3002<\/li>\n<li><strong>\u61c9\u7528\u7a0b\u5e8f\u885d\u7a81\uff1a<\/strong>\u67d0\u4e9b\u61c9\u7528\u7a0b\u5e8f\u53ef\u80fd\u6703\u5617\u8a66\u572880\u7aef\u53e3\u4e0a\u904b\u884c\u6578\u64da\u5eab\u670d\u52d9\uff0c\u5c0e\u81f4\u7aef\u53e3\u885d\u7a81\u3002<\/li>\n<li><strong>\u5b89\u5168\u6f0f\u6d1e\uff1a<\/strong>\u5982\u679c\u6578\u64da\u5eab\u670d\u52d9\u53d7\u5230\u653b\u64ca\uff0c\u653b\u64ca\u8005\u53ef\u80fd\u6703\u4fee\u6539\u5176\u914d\u7f6e\u4ee5\u4f7f\u752880\u7aef\u53e3\uff0c\u5f9e\u800c\u96b1\u85cf\u5176\u6d3b\u52d5\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e6%aa%a2%e6%9f%a5%e6%95%b8%e6%93%9a%e5%ba%ab%e4%bd%94%e7%94%a8%e7%9a%84%e7%ab%af%e5%8f%a3-IGCOfdFWGA\">\u5982\u4f55\u6aa2\u67e5\u6578\u64da\u5eab\u4f54\u7528\u7684\u7aef\u53e3<\/h2>\n<p>\u8981\u78ba\u5b9a\u6578\u64da\u5eab\u662f\u5426\u4f54\u7528\u4e8680\u7aef\u53e3\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>netstat -tuln | grep :80<\/code><\/pre>\n<p>\u9019\u689d\u547d\u4ee4\u5c07\u986f\u793a\u6240\u6709\u6b63\u5728\u4f7f\u752880\u7aef\u53e3\u7684\u670d\u52d9\u3002\u5982\u679c\u767c\u73fe\u6578\u64da\u5eab\u670d\u52d9\u5728\u6b64\u7aef\u53e3\u4e0a\u904b\u884c\uff0c\u5247\u9700\u8981\u9032\u4e00\u6b65\u8abf\u67e5\u3002<\/p>\n<h2 id=\"%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-IGCOfdFWGA\">\u89e3\u6c7a\u65b9\u6848<\/h2>\n<h3 id=\"1-%e4%bf%ae%e6%94%b9%e6%95%b8%e6%93%9a%e5%ba%ab%e9%85%8d%e7%bd%ae-IGCOfdFWGA\">1. \u4fee\u6539\u6578\u64da\u5eab\u914d\u7f6e<\/h3>\n<p>\u5982\u679c\u78ba\u5b9a\u6578\u64da\u5eab\u670d\u52d9\u4e0d\u61c9\u8a72\u4f7f\u752880\u7aef\u53e3\uff0c\u53ef\u4ee5\u901a\u904e\u4fee\u6539\u5176\u914d\u7f6e\u6587\u4ef6\u4f86\u66f4\u6539\u7aef\u53e3\u3002\u4ee5MySQL\u70ba\u4f8b\uff0c\u60a8\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u64cd\u4f5c\uff1a<\/p>\n<ul>\n<li>\u627e\u5230MySQL\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u901a\u5e38\u4f4d\u65bc \/etc\/mysql\/my.cnf \u6216 \/etc\/my.cnf\u3002<\/li>\n<li>\u6253\u958b\u914d\u7f6e\u6587\u4ef6\uff0c\u5c0b\u627e\u4ee5\u4e0b\u884c\uff1a<\/li>\n<pre><code>[mysqld]\nport=80<\/code><\/pre>\n<li>\u5c07\u7aef\u53e3\u865f\u66f4\u6539\u70ba\u5176\u4ed6\u672a\u88ab\u4f54\u7528\u7684\u7aef\u53e3\uff0c\u4f8b\u59823306\uff1a<\/li>\n<pre><code>[mysqld]\nport=3306<\/code><\/pre>\n<li>\u4fdd\u5b58\u6587\u4ef6\u4e26\u91cd\u555fMySQL\u670d\u52d9\uff1a<\/li>\n<pre><code>sudo systemctl restart mysql<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3 id=\"2-%e5%81%9c%e6%ad%a2%e4%bd%94%e7%94%a880%e7%ab%af%e5%8f%a3%e7%9a%84%e6%9c%8d%e5%8b%99-IGCOfdFWGA\">2. \u505c\u6b62\u4f54\u752880\u7aef\u53e3\u7684\u670d\u52d9<\/h3>\n<p>\u5982\u679c\u6578\u64da\u5eab\u670d\u52d9\u4e0d\u61c9\u8a72\u904b\u884c\u572880\u7aef\u53e3\uff0c\u60a8\u53ef\u4ee5\u9078\u64c7\u505c\u6b62\u8a72\u670d\u52d9\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4f86\u505c\u6b62\u670d\u52d9\uff1a<\/p>\n<pre><code>sudo systemctl stop <\/code><\/pre>\n<p>\u8acb\u5c07\u66ff\u63db\u70ba\u5be6\u969b\u7684\u670d\u52d9\u540d\u7a31\uff0c\u4f8b\u5982nginx\u6216apache\u3002<\/p>\n<h3 id=\"3-%e6%aa%a2%e6%9f%a5%e5%ae%89%e5%85%a8%e6%80%a7-IGCOfdFWGA\">3. \u6aa2\u67e5\u5b89\u5168\u6027<\/h3>\n<p>\u5982\u679c\u61f7\u7591\u6578\u64da\u5eab\u670d\u52d9\u88ab\u653b\u64ca\uff0c\u5efa\u8b70\u6aa2\u67e5\u7cfb\u7d71\u7684\u5b89\u5168\u6027\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5\u7cfb\u7d71\u65e5\u8a8c\uff1a<\/p>\n<pre><code>sudo cat \/var\/log\/auth.log<\/code><\/pre>\n<p>\u67e5\u770b\u662f\u5426\u6709\u53ef\u7591\u7684\u767b\u9304\u6d3b\u52d5\uff0c\u4e26\u8003\u616e\u52a0\u5f37\u5b89\u5168\u63aa\u65bd\uff0c\u4f8b\u5982\u66f4\u6539\u5bc6\u78bc\u3001\u66f4\u65b0\u8edf\u4ef6\u548c\u914d\u7f6e\u9632\u706b\u7246\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-IGCOfdFWGA\">\u7e3d\u7d50<\/h2>\n<p>\u6578\u64da\u5eab\u4f54\u752880\u7aef\u53e3\u7684\u554f\u984c\u53ef\u80fd\u6703\u5c0e\u81f4\u7db2\u7ad9\u7121\u6cd5\u6b63\u5e38\u904b\u884c\u3002\u901a\u904e\u6aa2\u67e5\u914d\u7f6e\u3001\u505c\u6b62\u4e0d\u5fc5\u8981\u7684\u670d\u52d9\u4ee5\u53ca\u52a0\u5f37\u5b89\u5168\u6027\uff0c\u53ef\u4ee5\u6709\u6548\u89e3\u6c7a\u6b64\u554f\u984c\u3002\u5982\u679c\u60a8\u9700\u8981\u66f4\u7a69\u5b9a\u7684\u670d\u52d9\uff0c\u8003\u616e\u4f7f\u7528<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u6216<a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a>\u4f86\u78ba\u4fdd\u60a8\u7684\u61c9\u7528\u7a0b\u5e8f\u548c\u6578\u64da\u5eab\u80fd\u5920\u6b63\u5e38\u904b\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3\u5982\u4f55\u89e3\u6c7a\u6578\u64da\u5eab\u4f54\u752880\u7aef\u53e3\u7684\u554f\u984c\uff0c\u907f\u514d\u7aef\u53e3\u885d\u7a81\uff0c\u78ba\u4fdd\u7db2\u9801\u670d\u52d9\u6b63\u5e38\u904b\u884c\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-187666","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/187666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=187666"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/187666\/revisions"}],"predecessor-version":[{"id":187667,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/187666\/revisions\/187667"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=187666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=187666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=187666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}