{"id":310,"date":"2019-08-23T20:13:11","date_gmt":"2019-08-23T12:13:11","guid":{"rendered":"https:\/\/cloudbool.com\/archive\/?p=310"},"modified":"2019-08-23T20:13:11","modified_gmt":"2019-08-23T12:13:11","slug":"server-port-access","status":"publish","type":"post","link":"https:\/\/cloudbool.com\/archive\/server-port-access.html","title":{"rendered":"\u670d\u52a1\u5668\u7aef\u53e3\u6216\u670d\u52a1\u65e0\u6cd5\u8bbf\u95ee\u89e3\u51b3\u529e\u6cd5"},"content":{"rendered":"<p>\u7ecf\u5e38\u4f1a\u9047\u5230\u6709\u4e9b\u670b\u53cb\u6765\u95ee\u6211\uff0c\u4e3a\u4ec0\u4e48\u670d\u52a1\u5668\u6709\u4e9b\u670d\u52a1\u6bd4\u5982MySQL\u3001SSH\u3001HTTP\u3001HTTPS\u7b49\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u8bbf\u95ee\uff0c\u660e\u660e\u662f\u6309\u7167\u6587\u6863\u6765\u64cd\u4f5c\u7684\uff0c\u5230\u6700\u540e\u4e3a\u4ec0\u4e48\u5c31\u662f\u65e0\u6cd5\u8bbf\u95ee\u60f3\u8981\u8bbf\u95ee\u7684\u670d\u52a1\u3002\u4e3a\u4e86\u5e2e\u52a9\u6709\u540c\u6837\u95ee\u9898\u7684\u670b\u53cb\uff0c\u8fd9\u91cc\u6211\u60f3\u628a\u6211\u9047\u5230\u8fd9\u79cd\u95ee\u9898\u7684\u5904\u7406\u601d\u8def\u8bb0\u5f55\u4e00\u4e0b\uff0c\u5e0c\u671b\u80fd\u5e2e\u52a9\u5230\u5404\u4f4d\u540c\u6837\u9047\u5230\u5404\u79cd\u670d\u52a1\u5668\u7aef\u53e3\u65e0\u6cd5\u8bbf\u95ee\u7684\u95ee\u9898\u3002<br \/>\n<!--more--><\/p>\n<h2>\u89e3\u51b3\u601d\u8def<\/h2>\n<p>\u7b80\u5355\u6765\u8bf4\uff0c\u89e3\u51b3\u95ee\u9898\u7684\u601d\u8def\u5927\u6982\u6709\u4ee5\u4e0b\u51e0\u4e2a\uff1a<\/p>\n<ul>\n<li>\u786e\u5b9a\u60f3\u8981\u8bbf\u95ee\u7684\u670d\u52a1\u5668IP\u662f\u5426\u6b63\u786e<\/li>\n<li>\u670d\u52a1\u662f\u5426\u6b63\u5e38\u542f\u52a8\u4e14\u76d1\u542c\u5728\u5bf9\u5e94\u7684\u7aef\u53e3<\/li>\n<li>\u4e91\u670d\u52a1\u5668\u7684\u8bdd\uff0c\u5b89\u5168\u7ec4\u7aef\u53e3\u662f\u5426\u653e\u884c<\/li>\n<li>\u670d\u52a1\u5668\u64cd\u4f5c\u7cfb\u7edf\u5185\u7684\u9632\u706b\u5899\u662f\u5426\u653e\u884c<\/li>\n<\/ul>\n<p>\u4e0b\u9762\u6765\u8bf4\u8bf4\u5177\u4f53\u601d\u8def\u3002<\/p>\n<h2>\u786e\u5b9a\u670d\u52a1\u5668IP\u662f\u5426\u6b63\u786e<\/h2>\n<p>\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u6bd4\u5982\u8bf4\u5185\u7f51\u673a\u5668\uff0cIP\u5f00\u5934\u4e3a<strong>192.168.x.x<\/strong>\u3001<strong>172.16.x.x<\/strong>\u53ca<strong>10.x.x.x<\/strong>\uff0c\u5982\u679c\u6ca1\u6709\u5728\u8def\u7531\u5668\u56fa\u5b9aIP\u6216\u8005\u6ca1\u6709\u8bbe\u7f6e\u9759\u6001IP\u7684\u60c5\u51b5\u4e0b\uff0c\u7cfb\u7edf\u91cd\u542f\u53ef\u80fd\u4f1a\u5bfc\u81f4IP\u53d8\u5316\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u6700\u597d\u662f\u786e\u5b9a\u4e0bIP\u662f\u5426\u6709\u53d8\u5316\u3002<br \/>\n\u800c\u5bf9\u4e8e\u5916\u7f51\u7684\u670d\u52a1\u5668\u6765\u8bf4\uff0c\u5982\u679c\u662f\u901a\u8fc7\u57df\u540d\u8bbf\u95ee\u7684\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884cping\u4e00\u4e0b\u5bf9\u5e94\u7684\u57df\u540d\u6216\u8005IP\uff0c\u901a\u8fc7ping\u7684\u65b9\u5f0f\u53ef\u4ee5\u786e\u5b9a\u57df\u540d\u662f\u5426\u89e3\u6790\u5230\u4e86\u6b63\u786e\u7684IP\u4e0a\uff0c\u540c\u65f6\u4e5f\u53ef\u4ee5\u786e\u5b9a\u5bf9\u5e94\u7684\u670d\u52a1\u5668\u662f\u5426\u5728\u7ebf\uff0cWindows\u6253\u5f00CMD\u6216\u8005PowerShell\uff0cmacOS\u548cLinux\u6253\u5f00\u7ec8\u7aef\uff0c\u6bd4\u5982ping\u672c\u7ad9\u670d\u52a1\u5668\uff1a<\/p>\n<blockquote><p>\n  ping cloudbool.com\n<\/p><\/blockquote>\n<h2>\u670d\u52a1\u662f\u5426\u6b63\u5e38\u542f\u52a8\u4e14\u76d1\u542c\u5728\u5bf9\u5e94\u7684\u7aef\u53e3<\/h2>\n<p>\u5982\u679c\u57df\u540d\u89e3\u6790\u51fa\u6765\u7684IP\u6b63\u786e\uff0c\u4e14\u670d\u52a1\u5668\u5728\u7ebf\uff0c\u5373\u53ef\u8003\u8651\u4e0b\u5bf9\u5e94\u7684\u670d\u52a1\u662f\u5426\u5df2\u6b63\u786e\u542f\u52a8\u3002<br \/>\n\u62ffLinux\u670d\u52a1\u5668\u6765\u8bf4\uff0c\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e\u7a0b\u5e8f\u5f00\u673a\u542f\u52a8\uff0c\u6bd4\u5982MySQL\u670d\u52a1\uff0c\u5982\u679c\u7cfb\u7edf\u91cd\u542f\uff0c\u53ef\u80fd\u91cd\u542f\u4e4b\u540e\u5bf9\u5e94\u7684MySQL\u670d\u52a1\u5e76\u6ca1\u6709\u542f\u52a8\uff0c\u8fd9\u4e2a\u65f6\u5019\u9700\u8981\u624b\u52a8\u542f\u52a8\uff0c\u5982\u679c\u662fDebian8\/9\/10\uff0cUbuntu 16.04\/18.04\uff0cCentOS 7\/8\u7b49\u4f7f\u7528systemd\u7684\u7cfb\u7edf\uff0c\u5e38\u89c1\u7684\u51e0\u4e2a\u670d\u52a1\u542f\u52a8\/\u91cd\u542f\/\u5f00\u673a\u542f\u52a8\u547d\u4ee4\u5982\u4e0b\uff1a<br \/>\nNginx\uff1a systemctl start\/restar\/enable nginx<br \/>\nMySQL\uff1a systemctl start\/restar\/enable mysql\/mysqld\/mysql-server\/mariadb<br \/>\nApache\uff1a systemctl start\/restar\/enable apache2\/httpd<br \/>\nSSH\uff1a systemctl start\/restar\/enable ssh\/openssh\/sshd<br \/>\n\u5bf9\u5e94\u7684\u51e0\u4e2a\u670d\u52a1\u9ed8\u8ba4\u76d1\u542c\u7684\u7aef\u53e3\u5982\u4e0b\uff1a<br \/>\nNginx\uff1a HTTP\uff1a80 HTTPS\uff1a443<br \/>\nApache\uff1a HTTP\uff1a80 HTTPS\uff1a443<br \/>\nMySQL\/MariaDB\uff1a 3306<br \/>\nSSH: 22<br \/>\nMongoDB\uff1a 27017<br \/>\nRedis\uff1a 6379<br \/>\n\u6b64\u5916\uff0c\u5bf9\u4e8e\u670d\u52a1\u5668\u6765\u8bf4\uff0c\u53ef\u80fd\u6709\u4e9b\u5e38\u5e74\u7d2f\u6708\u8fd0\u884c\u4e4b\u540e\uff0c\u6709\u4e9b\u670d\u52a1\u4f1a\u56e0\u4e3a\u5185\u5b58\u4e0d\u8db3\u6216\u8005\u7a0b\u5e8fbug\u7b49\u539f\u56e0\u5bfc\u81f4\u7ecf\u5e38\u5d29\u6e83\u6216\u8005\u5f02\u5e38\u9000\u51fa\u7b49\u60c5\u51b5\uff0c\u5982\u679c\u662f\u8fd9\u79cd\u60c5\u51b5\uff0c\u5efa\u8bae\u662f\u901a\u8fc7\u5bf9\u5e94\u7684\u65e5\u5fd7\u6587\u4ef6\u8fdb\u884c\u67e5\u627e\u539f\u56e0\uff0c\u89e3\u51b3\u95ee\u9898\u4e4b\u540e\u91cd\u542f\u670d\u52a1\u3002<\/p>\n<h2>\u68c0\u67e5\u4e91\u670d\u52a1\u5668\u5b89\u5168\u7ec4\u662f\u5426\u653e\u884c<\/h2>\n<p>\u6709\u4e9b\u4e91\u670d\u52a1\u5382\u5546\u6bd4\u5982\u8bf4\u56fd\u5185\u7684\u963f\u91cc\u4e91\u3001\u817e\u8baf\u4e91\uff0c\u9ed8\u8ba4\u5f00\u542f\u4e86\u5b89\u5168\u7ec4\uff0c\u5982\u679c\u6211\u4eec\u5728\u8d2d\u4e70\u4e4b\u540e\u6ca1\u6709\u5728\u5b89\u5168\u7ec4\u653e\u884c\u5bf9\u5e94\u7684\u7aef\u53e3\uff0c\u5373\u4f7f\u914d\u7f6e\u597d\u4e86\u5177\u4f53\u670d\u52a1\uff0c\u6211\u4eec\u8fd8\u662f\u6ca1\u529e\u6cd5\u8bbf\u95ee\u7684\uff0c\u56e0\u4e3a\u8bf7\u6c42\u5728\u8fd8\u6ca1\u5230\u8fbe\u670d\u52a1\u5668\u5c31\u88ab\u5b89\u5168\u7ec4\u62e6\u622a\u4e86\u3002<br \/>\n\u4e0b\u9762\u5206\u522b\u8bf4\u8bf4\u963f\u91cc\u4e91\u53ca\u817e\u8baf\u4e91\u7684\u5b89\u5168\u7ec4\u8bbe\u7f6e\u65b9\u6cd5\u3002<\/p>\n<h3>\u963f\u91cc\u4e91ECS\u670d\u52a1\u5668\u914d\u7f6e\u5b89\u5168\u7ec4\u7aef\u53e3\u653e\u884c<\/h3>\n<p>\u767b\u5f55\u963f\u91cc\u4e91\u63a7\u5236\u53f0\uff0c\u7136\u540e\u5230\u5bf9\u5e94\u7684ECS\u5730\u57df\u627e\u5230\u60f3\u8981\u914d\u7f6e\u7684\u5b9e\u4f8b\uff0c\u70b9\u51fb\u5b9e\u4f8b\u53f3\u4fa7\u7684\u201c\u66f4\u591a\u201d\uff0c\u7136\u540e\u5728\u5f39\u51fa\u7684\u83dc\u5355\u4e2d\u70b9\u51fb<strong>\u7f51\u7edc\u548c\u5b89\u5168\u7ec4<\/strong>\uff0c\u5982\u56fe\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/x.cloudbool.com\/img\/2019\/08\/23\/aliyun-ecs-config.png\" alt=\"aliyun-ecs-config.png\" \/><br \/>\n\u7136\u540e\u70b9\u51fb\u540e\u9762\u7684<strong>\u5b89\u5168\u7ec4\u914d\u7f6e<\/strong>\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u8fd9\u91cc\u4f1a\u6709\u4e2a\u9ed8\u8ba4\u7684\u5b89\u5168\u7ec4\u89c4\u5219\uff0c\u8fd9\u4e2a\u5728\u8d2d\u4e70\u670d\u52a1\u5668\u7684\u65f6\u5019\u5c31\u4f1a\u8981\u6c42\u8bbe\u7f6e\u597d\uff0c\u70b9\u51fb\u201c\u5b89\u5168\u7ec4\u201dtab\u4e2d\u9ed8\u8ba4\u7684\u90a3\u4e2a\u9ed8\u8ba4\u89c4\u5219\u53f3\u4fa7\u7684<strong>\u914d\u7f6e\u89c4\u5219<\/strong>\uff0c\u5982\u56fe\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/x.cloudbool.com\/img\/2019\/08\/23\/aliyun-ecs-config-rule.png\" alt=\"aliyun-ecs-config-rule.png\" \/><br \/>\n\u5728\u8fdb\u5165\u7684\u9875\u9762\u4e2d\u53ef\u4ee5\u67e5\u770b\u5df2\u5f00\u653e\u7684\u7aef\u53e3\uff0c\u5982\u679c\u6211\u4eec\u9700\u8981\u4f7f\u7528\u7684\u7aef\u53e3\u6ca1\u6709\u5f00\u653e\uff0c\u53ef\u4ee5\u70b9\u51fb\u9875\u9762\u53f3\u4e0a\u89d2\u7684<strong>\u6dfb\u52a0\u5b89\u5168\u7ec4\u89c4\u5219<\/strong>\u6216\u8005<strong>\u5feb\u901f\u521b\u5efa\u89c4\u5219<\/strong>\u8fdb\u884c\u6dfb\u52a0\uff0c\u76f8\u5e94\u8bbe\u7f6e\u5982\u4e0b\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/x.cloudbool.com\/img\/2019\/08\/23\/aliyun-ecs-quick-add-rule.png\" alt=\"aliyun-ecs-quick-add-rule.png\" \/><br \/>\n\u5e38\u7528\u7aef\u53e3\u53ca\u81ea\u5b9a\u4e49\u6dfb\u52a0\u53ea\u9700\u8981\u8bbe\u7f6e\u4e00\u4e2a\u5c31\u884c\uff0c<strong>\u4e0d\u9700\u8981\u540c\u65f6\u8bbe\u7f6e<\/strong>\u3002<br \/>\n\u9664\u4e86ECS\u4e4b\u5916\uff0c\u8f7b\u91cf\u4e91AWS\u8bbe\u7f6e\u65b9\u5f0f\u4e5f\u7c7b\u4f3c\u3002<\/p>\n<h2>\u817e\u8baf\u4e91\u670d\u52a1\u5668\u914d\u7f6e\u5b89\u5168\u7ec4\u7aef\u53e3\u653e\u884c<\/h2>\n<p>\u548c\u963f\u91cc\u4e91\u5dee\u4e0d\u591a\uff0c\u817e\u8baf\u4e91\u653e\u884c\u64cd\u4f5c\u5927\u540c\u5c0f\u5f02\u3002<br \/>\n\u767b\u5f55\u817e\u8baf\u4e91\u63a7\u5236\u53f0\uff0c\u7136\u540e\u627e\u5230\u5bf9\u5e94\u7684\u9700\u8981\u64cd\u4f5c\u7684CVM\u670d\u52a1\u5668\uff0c\u70b9\u51fb\u53f3\u4fa7\u7684\u66f4\u591a\uff0c\u5f39\u51fa\u4e0b\u62c9\u83dc\u5355\uff0c\u70b9\u51fb<strong>\u5b89\u5168\u7ec4<\/strong>\uff0c\u5f39\u51fa\u7684<strong>\u914d\u7f6e\u5b89\u5168\u7ec4<\/strong>\u70b9\u51fb\uff0c\u5982\u56fe\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/x.cloudbool.com\/img\/2019\/08\/23\/tencent-cloud-cvm-to-securitygroup.png\" alt=\"tencent-cloud-cvm-to-securitygroup.png\" \/><br \/>\n\u8bb0\u4f4f\u8fd9\u4e2ains\u5f00\u5934\u7684\u5b89\u5168\u7ec4ID\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/x.cloudbool.com\/img\/2019\/08\/23\/tencent-cloud-cvm-securitygroup-list.png\" alt=\"tencent-cloud-cvm-securitygroup-list.png\" \/><br \/>\n\u7136\u540e\u5230\u5de6\u4fa7\u83dc\u5355\u627e\u5230<strong>\u5b89\u5168\u7ec4<\/strong>\u70b9\u51fb\u8fdb\u53bb\uff0c\u5728\u5b89\u5168\u7ec4\u9875\u9762\u627e\u5230\u4e0a\u4e00\u6b65\u90a3\u4e2ains\u5f00\u5934\u7684ID\uff0c\u70b9\u51fb\u8fdb\u5165\uff0c\u5982\u56fe\u662f\u4e00\u4e9b\u5df2\u5f00\u653e\u7684\u7aef\u53e3\u4fe1\u606f\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/x.cloudbool.com\/img\/2019\/08\/23\/tencent-cloud-cvm-securitygroup-port.png\" alt=\"tencent-cloud-cvm-securitygroup-port.png\" \/><br \/>\n\u7136\u540e\u70b9\u51fb\u5217\u8868\u4e0a\u65b9\u7684<strong>\u5165\u7ad9\u89c4\u5219<\/strong>\u4e0b\u9762\u7684\u6dfb\u52a0\u89c4\u5219\uff0c\u5982\u56fe\uff0c\u6309\u7167\u5982\u4e0b\u683c\u5f0f\u6dfb\u52a0\u89c4\u5219\u5373\u53ef\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/x.cloudbool.com\/img\/2019\/08\/23\/tencent-cloud-securitygroup-add-rule.png\" alt=\"tencent-cloud-securitygroup-add-rule.png\" \/><\/p>\n<h2>\u670d\u52a1\u5668\u7cfb\u7edf\u9632\u706b\u5899\u662f\u5426\u653e\u884c\u5bf9\u5e94\u7684\u7aef\u53e3<\/h2>\n<p>\u5982\u679c\u5230\u4e0a\u4e00\u6b65\u90fd\u6ca1\u4ec0\u4e48\u95ee\u9898\u7684\u8bdd\uff0c\u8fd9\u91cc\u5efa\u8bae\u68c0\u67e5\u4e00\u4e0b\u670d\u52a1\u5668\u7cfb\u7edf\u5185\u90e8\u7684\u9632\u706b\u5899\u662f\u5426\u653e\u884c\uff0c\u5982\u679c\u9632\u706b\u5899\u9650\u5236\u4e86\u5916\u90e8\u7684\u8bbf\u95ee\uff0c\u5373\u4f7f\u7a0b\u5e8f\u6b63\u786e\u76d1\u542c\u5728\u5bf9\u5e94\u7684\u7aef\u53e3\uff0c\u6211\u4eec\u4ece\u5916\u90e8\u4e5f\u662f\u65e0\u6cd5\u8bbf\u95ee\u7684\u3002<br \/>\n\u4e00\u822c\u6765\u8bf4\uff0c\u5982\u679c\u4f7f\u7528\u7684\u662f\u4e91\u670d\u52a1\u5382\u5546\u7684\u7cfb\u7edf\u6a21\u677f\uff0c\u9632\u706b\u5899\u9ed8\u8ba4\u662f\u6ca1\u6709\u5f00\u542f\u7684\uff0c\u4f46\u662f\u5982\u679c\u662f\u4f7f\u7528ISO\u955c\u50cf\u81ea\u5df1\u5b89\u88c5\u7684\u7cfb\u7edf\uff0c\u6bd4\u5982\u8bf4CentOS7\uff0c\u9ed8\u8ba4\u662f\u5f00\u542f\u9632\u706b\u5899\u7684\uff0c\u4e14\u9ed8\u8ba4\u9664\u4e86SSH\u76d1\u542c\u768422\u7aef\u53e3\u5916\uff0c\u5176\u4f59\u9ed8\u8ba4\u7981\u6b62\u3002<br \/>\n\u4ee5CentOS7\u4e3a\u4f8b\uff0c\u67e5\u8be2\u7aef\u53e3\u662f\u5426\u653e\u884c\uff1a<\/p>\n<blockquote><p>\n  firewall-cmd &#8211;zone=public &#8211;query-port=80\/tcp\n<\/p><\/blockquote>\n<p>\u5176\u4e2d\uff0c80\u662f\u5bf9\u5e94\u7684\u7aef\u53e3\uff0ctcp\u662f\u534f\u8bae\uff0c\u5982\u679c\u4f60\u4e0d\u6e05\u695a\u662ftcp\u8fd8\u662fudp\uff0c\u5efa\u8bae\u4f7f\u7528tcp\u67e5\u8be2\u5148\u3002<br \/>\n\u67e5\u770b\u9632\u706b\u5899\u662f\u5426\u5728\u8fd0\u884c\uff1a<\/p>\n<blockquote><p>\n  systemctl status firewalld\n<\/p><\/blockquote>\n<p>\u5173\u95ed\u9632\u706b\u5899\uff1a<\/p>\n<blockquote><p>\n  systemctl stop firewalld\n<\/p><\/blockquote>\n<p>\u7981\u6b62\u5f00\u673a\u542f\u52a8\uff1a<\/p>\n<blockquote><p>\n  systemctl disable firewalld\n<\/p><\/blockquote>\n<p>\u5f53\u7136\uff0c\u4e5f\u53ef\u4ee5\u6dfb\u52a0\u5bf9\u5e94\u7684\u7aef\u53e3\uff1a<\/p>\n<blockquote><p>\n  firewall-cmd &#8211;permanent &#8211;add-port=80\/tcp<br \/>\n  firewall-cmd &#8211;reload\n<\/p><\/blockquote>\n<p>\u6ce8\u610f\u4e0a\u9762\u7684<strong>reload<\/strong>\u547d\u4ee4\uff0c\u5982\u679c\u4e0d\u6267\u884c\u8fd9\u53e5\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6dfb\u52a0\u7684firewall\u89c4\u5219\u4e0d\u751f\u6548\u3002<\/p>\n<h2>\u5176\u4ed6\u60c5\u51b5<\/h2>\n<p>\u9664\u4e86\u4ee5\u4e0a\u51e0\u79cd\u5e38\u89c1\u60c5\u51b5\uff0c\u8bbf\u95ee\u4e0d\u4e86\u5bf9\u5e94\u7684\u670d\u52a1\uff0c\u4e5f\u53ef\u80fd\u662f\u670d\u52a1\u672c\u8eab\u6216\u8005\u64cd\u4f5c\u7cfb\u7edf\u5176\u4ed6\u7684\u9650\u5236\uff0c\u6bd4\u5982\u8bf4\uff0cNginx\u5728\u8fd0\u884c\uff0c\u4f46\u662f\u62a5403\u3001404\u3001502\u7b49\u9519\u8bef\uff0c\u6216\u8005MySQL\u5728\u6b63\u5e38\u8fd0\u884c\uff0c\u4f46\u662f\u4ece\u672c\u5730\u8fd8\u662f\u65e0\u6cd5\u6b63\u5e38\u8fde\u63a5\u5230MySQL\u670d\u52a1\u5668\uff0c\u8fd9\u5c31\u9700\u8981\u4ece\u5e94\u7528\u7a0b\u5e8f\u672c\u8eab\u914d\u7f6e\u53bb\u5165\u624b\uff0c\u6bd4\u5982\u68c0\u67e5Nginx\u662f\u5426\u914d\u7f6e\u6b63\u786e\uff0cMySQL\u662f\u5426\u5f00\u542f\u4e86\u8fdc\u7a0b\u8bbf\u95ee\u7b49\u3002<br \/>\n\u7279\u522b\u7684\uff0c\u5bf9\u4e8eCentOS7\uff0c\u5982\u679c\u786e\u8ba4\u670d\u52a1\u914d\u7f6e\u6b63\u786e\uff0c\u4f46\u4ecd\u65e7\u65e0\u6cd5\u6b63\u5e38\u8bbf\u95ee\uff0c\u8fd9\u4e2a\u65f6\u5019\u5c31\u5e94\u8be5\u8003\u8651\u4e0b\u662f\u5426\u662fSELinux\u7684\u95ee\u9898\u4e86\u3002\u7b80\u5355\u5730\u8bf4\uff0cSELinux\u662f\u4e00\u5957\u5b89\u5168\u589e\u5f3a\u7a0b\u5e8f\uff0c\u4f46\u662f\u5728\u6ca1\u6b63\u786e\u914d\u7f6e\u7684\u60c5\u51b5\u4e0b\u53ef\u80fd\u4f1a\u51fa\u73b0\u6743\u9650\u95ee\u9898\u3002<br \/>\n\u67e5\u770bSELinux\u72b6\u6001\uff1a<\/p>\n<blockquote><p>\n  sestatus\n<\/p><\/blockquote>\n<p>\u4e34\u65f6\u5173\u95edSELinux\uff1a<\/p>\n<blockquote><p>\n  setenforce 0\n<\/p><\/blockquote>\n<p>\u6c38\u4e45\u5173\u95edSELinux\uff1a<\/p>\n<pre><code>vi \/etc\/selinux\/config\nSELINUX=disabled\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u7ecf\u5e38\u4f1a\u9047\u5230\u6709\u4e9b\u670b\u53cb\u6765\u95ee\u6211\uff0c\u4e3a\u4ec0\u4e48\u670d\u52a1\u5668\u6709\u4e9b\u670d\u52a1\u6bd4\u5982MySQL\u3001SSH\u3001HTTP\u3001HTTPS\u7b49\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u8bbf\u95ee\uff0c\u660e &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/cloudbool.com\/archive\/server-port-access.html\"> <span class=\"screen-reader-text\">\u670d\u52a1\u5668\u7aef\u53e3\u6216\u670d\u52a1\u65e0\u6cd5\u8bbf\u95ee\u89e3\u51b3\u529e\u6cd5<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[9],"tags":[],"class_list":["post-310","post","type-post","status-publish","format-standard","hentry","category-mess"],"_links":{"self":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/comments?post=310"}],"version-history":[{"count":0,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/posts\/310\/revisions"}],"wp:attachment":[{"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/media?parent=310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/categories?post=310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudbool.com\/archive\/wp-json\/wp\/v2\/tags?post=310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}