{"id":1552,"date":"2016-12-19T04:03:43","date_gmt":"2016-12-18T20:03:43","guid":{"rendered":"http:\/\/cn.hostease.com\/xueyuan\/?p=1552"},"modified":"2016-12-19T04:03:43","modified_gmt":"2016-12-18T20:03:43","slug":"centos7-%e5%85%b3%e9%97%ad%e9%98%b2%e7%81%ab%e5%a2%99","status":"publish","type":"post","link":"https:\/\/cn.hostease.com\/xueyuan\/jishu\/centos7-%e5%85%b3%e9%97%ad%e9%98%b2%e7%81%ab%e5%a2%99\/","title":{"rendered":"Centos7 \u5173\u95ed\u9632\u706b\u5899"},"content":{"rendered":"<div id=\"cnblogs_post_body\">\n<p>CentOS 7.0\u9ed8\u8ba4\u4f7f\u7528\u7684\u662ffirewall\u4f5c\u4e3a\u9632\u706b\u5899\uff0c\u4f7f\u7528iptables\u5fc5\u987b\u91cd\u65b0\u8bbe\u7f6e\u4e00\u4e0b<\/p>\n<p>1\u3001\u76f4\u63a5\u5173\u95ed\u9632\u706b\u5899<\/p>\n<p>systemctl stop firewalld.service\u00a0#\u505c\u6b62firewall<\/p>\n<p>systemctl disable firewalld.service\u00a0#\u7981\u6b62firewall\u5f00\u673a\u542f\u52a8<\/p>\n<p>2\u3001\u8bbe\u7f6e\u00a0iptables service<\/p>\n<p>yum -y install iptables-services<\/p>\n<p>\u5982\u679c\u8981\u4fee\u6539\u9632\u706b\u5899\u914d\u7f6e\uff0c\u5982\u589e\u52a0\u9632\u706b\u5899\u7aef\u53e33306<\/p>\n<p>vi \/etc\/sysconfig\/iptables<\/p>\n<p>\u589e\u52a0\u89c4\u5219<\/p>\n<p>-A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 3306 -j ACCEPT<\/p>\n<p>\u4fdd\u5b58\u9000\u51fa\u540e<\/p>\n<p>systemctl restart iptables.service\u00a0#\u91cd\u542f\u9632\u706b\u5899\u4f7f\u914d\u7f6e\u751f\u6548<\/p>\n<p>systemctl enable iptables.service\u00a0#\u8bbe\u7f6e\u9632\u706b\u5899\u5f00\u673a\u542f\u52a8<\/p>\n<p>\u6700\u540e\u91cd\u542f\u7cfb\u7edf\u4f7f\u8bbe\u7f6e\u751f\u6548\u5373\u53ef\u3002<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/www.cnblogs.com\/silent2012\/archive\/2015\/07\/28\/4682770.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7.0\u9ed8\u8ba4\u4f7f\u7528\u7684\u662ffirewall\u4f5c\u4e3a\u9632\u706b\u5899\uff0c\u4f7f\u7528iptables\u5fc5\u987b\u91cd\u65b0\u8bbe\u7f6e\u4e00\u4e0b 1\u3001\u76f4\u63a5\u5173\u95ed &#8230; <a title=\"Centos7 \u5173\u95ed\u9632\u706b\u5899\" class=\"read-more\" href=\"https:\/\/cn.hostease.com\/xueyuan\/jishu\/centos7-%e5%85%b3%e9%97%ad%e9%98%b2%e7%81%ab%e5%a2%99\/\" aria-label=\"\u9605\u8bfb Centos7 \u5173\u95ed\u9632\u706b\u5899\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[49,5],"tags":[495,301],"class_list":["post-1552","post","type-post","status-publish","format-standard","hentry","category-linux","category-jishu","tag-centos7-x","tag-iptables"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/1552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/comments?post=1552"}],"version-history":[{"count":1,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/1552\/revisions"}],"predecessor-version":[{"id":1553,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/1552\/revisions\/1553"}],"wp:attachment":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/media?parent=1552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/categories?post=1552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/tags?post=1552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}