{"id":18406,"date":"2014-08-24T12:08:17","date_gmt":"2014-08-24T04:08:17","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/08\/24\/centos-7-x-etc-rc-d-rc-local-%e9%96%8b%e6%a9%9f%e6%99%82%e4%b8%8d%e6%9c%83%e8%87%aa%e5%8b%95%e5%9f%b7%e8%a1%8c\/"},"modified":"2014-08-24T12:08:17","modified_gmt":"2014-08-24T04:08:17","slug":"centos-7-x-etc-rc-d-rc-local-%e9%96%8b%e6%a9%9f%e6%99%82%e4%b8%8d%e6%9c%83%e8%87%aa%e5%8b%95%e5%9f%b7%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/08\/24\/centos-7-x-etc-rc-d-rc-local-%e9%96%8b%e6%a9%9f%e6%99%82%e4%b8%8d%e6%9c%83%e8%87%aa%e5%8b%95%e5%9f%b7%e8%a1%8c\/","title":{"rendered":"CentOS 7.x \/etc\/rc.d\/rc.local \u958b\u6a5f\u6642\u4e0d\u6703\u81ea\u52d5\u57f7\u884c"},"content":{"rendered":"<p>\u4e4b\u524d\u90fd\u6703\u628a\u4e00\u4e9b\u6bcf\u6b21 CentOS Linux \u958b\u6a5f\u6642\u6703\u57f7\u884c\u7684\u4e00\u4e9b\u6307\u4ee4\u5beb\u5728 \/etc\/rc.d\/rc.local \u6a94\u6848\u5167\uff0c\u4f46\u6700\u8fd1\u537b\u767c\u73fe\u5b83\u597d\u50cf\u4e0d\u6703\u57f7\u884c<br \/># <span style=\"color: #ff0000;\">cat \/etc\/rc.d\/rc.local<\/span><br \/><span style=\"color: #0000ff;\">#!\/bin\/bash<\/span><br \/><span style=\"color: #0000ff;\"># THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES<\/span><br \/><span style=\"color: #0000ff;\">#<\/span><br \/><span style=\"color: #0000ff;\"># It is highly advisable to create own systemd services or udev rules<\/span><br \/><span style=\"color: #0000ff;\"># to run scripts during boot instead of using this file.<\/span><br \/><span style=\"color: #0000ff;\">#<\/span><br \/><span style=\"color: #0000ff;\"># In constrast to previous versions due to parallel execution during boot<\/span><br \/><span style=\"color: #0000ff;\"># this script will NOT be run after all other services.<\/span><br \/><span style=\"color: #0000ff;\">#<\/span><br \/><span style=\"color: #0000ff;\"># Please note that you must run &#8216;chmod +x \/etc\/rc.d\/rc.local&#8217; to ensure<\/span><br \/><span style=\"color: #0000ff;\"># that this script will be executed during boot.<\/span><\/p>\n<p><span style=\"color: #0000ff;\">touch \/var\/lock\/subsys\/local<\/span><br \/><span style=\"color: #0000ff;\">sh \/etc\/rc.d\/firewall.server<\/span>[@more@]\u4f46\u624b\u52d5\u57f7\u884c firewall.server \u53ef\u4ee5\u6b63\u5e38\u57f7\u884c<br \/># <span style=\"color: #ff0000;\">sh \/etc\/rc.d\/firewall.server<\/span><\/p>\n<p>\u5f8c\u4f86\u67e5\u770b\u4e00\u4e0b<span style=\"color: #0000ff;\"> \/etc\/rc.d\/rc.local<\/span><br \/># <span style=\"color: #ff0000;\">ls -l \/etc\/rc.d\/rc.local<\/span><br \/><span style=\"color: #0000ff;\">-rw-r&#8211;r&#8211; 1 root root 630\u00a0 8\u6708 24 11:26 \/etc\/rc.d\/rc.local<\/span><\/p>\n<p>\u767c\u73fe\u4f3c\u4e4e\u6c92\u6709\u57f7\u884c\u7684\u6b0a\u9650<\/p>\n<p>\u5f8c\u4f86\u52a0\u4e0a\u4e86 <span style=\"color: #0000ff;\">\/etc\/rc.d\/rc.local<\/span> \u7684\u57f7\u884c\u6b0a\u9650\uff0c\u4f3c\u4e4e\u958b\u6a5f\u6642\u6703\u81ea\u52d5\u57f7\u884c\u4e86\uff01<br \/># <span style=\"color: #ff0000;\">chmod 744 \/etc\/rc.d\/rc.local<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u90fd\u6703\u628a\u4e00\u4e9b\u6bcf\u6b21 CentOS Linux \u958b\u6a5f\u6642\u6703\u57f7\u884c\u7684\u4e00\u4e9b\u6307\u4ee4\u5beb\u5728 \/etc\/rc.d\/rc.local &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/08\/24\/centos-7-x-etc-rc-d-rc-local-%e9%96%8b%e6%a9%9f%e6%99%82%e4%b8%8d%e6%9c%83%e8%87%aa%e5%8b%95%e5%9f%b7%e8%a1%8c\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008CentOS 7.x \/etc\/rc.d\/rc.local \u958b\u6a5f\u6642\u4e0d\u6703\u81ea\u52d5\u57f7\u884c\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],"tags":[],"class_list":["post-18406","post","type-post","status-publish","format-standard","hentry","category-c-78462"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["514410"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18406"}],"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=18406"}],"version-history":[{"count":0,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18406\/revisions"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=18406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=18406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=18406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}