{"id":525,"date":"2015-05-24T08:36:28","date_gmt":"2015-05-24T00:36:28","guid":{"rendered":"http:\/\/www.datarelab.com\/blog\/?p=525"},"modified":"2015-05-24T08:36:28","modified_gmt":"2015-05-24T00:36:28","slug":"update-rc-d%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.datarelab.com\/blog\/Technical_literature\/525.html","title":{"rendered":"update-rc.d\u4f7f\u7528"},"content":{"rendered":"<p>\u5728Linux\u7cfb\u7edf\u4e0b\uff0c\u4e00\u4e2aServices\u7684\u542f\u52a8\u3001\u505c\u6b62\u4ee5\u53ca\u91cd\u542f\u901a\u5e38\u662f\u901a\u8fc7\/etc\/init.d\u76ee\u5f55\u4e0b\u7684\u811a\u672c\u6765\u63a7\u5236\u7684\u3002\u7136\u800c\uff0c\u5728\u542f\u52a8\u6216\u6539\u53d8\u8fd0\u884c\u7ea7\u522b\u65f6\uff0c\u662f\u5728\/etc\/rcX.d\u4e2d\u6765\u641c\u7d22\u811a\u672c\u3002\u5176\u4e2dX\u662f\u8fd0\u884c\u7ea7\u522b\u7684number\u3002\u672c\u6587\u5c06\u89e3\u91ca\u5982\u4f55\u542f\u52a8\u3001\u5173\u95ed\u548c\u4fee\u6539\u670d\u52a1\u7684\u8fd0\u884c\u3002\u5f53\u4f60\u5728Debian\u4e0b\u5b89\u88c5\u4e00\u4e2a\u65b0\u7684\u670d\u52a1\uff0c\u6bd4\u5982Apache2\uff0c\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5b83\u4f1a\u542f\u52a8\uff0c\u5e76\u5728\u4e0b\u4e00\u6b21\u91cd\u542f\u540e\u81ea\u52a8\u542f\u52a8\u3002\u4f46\u662f\u5982\u679c\u4f60\u4e0d\u662f\u4e00\u76f4\u9700\u8981\u8fd9\u4e2a\u670d\u52a1\uff0c\u53ea\u5728\u9700\u8981\u7684\u65f6\u5019\u542f\u7528\u5b83\uff0c\u4f60\u53ef\u4ee5\u7981\u7528\u5b83\u3002\u76f4\u5230\u4f60\u9700\u8981\u4f7f\u7528\u7684\u65f6\u5019\uff0c\u6267\u884c\u5982\u4e0b\u6307\u4ee4\uff1a<br \/>\n\/etc\/init.d\/apache2 start<br \/>\n\u8981\u5b9e\u73b0\u8fd9\u4e2a\u76ee\u7684\uff0c\u4f60\u9700\u8981\u5148\u5728\/etc\/rcX.d\u76ee\u5f55\u4e2d\u5220\u9664\u6240\u6709apache2\u7684\u7b26\u53f7\u94fe\u63a5\uff0c\u4f46\u8fd9\u4e2a\u65b9\u6cd5\u64cd\u4f5c\u9ebb\u70e6\uff0c\u4e14\u6548\u7387\u4f4e\u4e0b\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u5efa\u8bae\u4f60\u4f7f\u7528update-rc.d\u547d\u4ee4\u6765\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\u3002<br \/>\n<strong>1\u3001\u5220\u9664\u4e00\u4e2a\u670d\u52a1<\/strong><br \/>\n\u5982\u679c\u4f60\u60f3\u624b\u52a8\u7684\u5b8c\u5168\u7981\u7528Apache2\u670d\u52a1\uff0c\u4f60\u9700\u8981\u5220\u9664\u5176\u4e2d\u7684\u6240\u6709\u5728\/etc\/rcX.d\u4e2d\u7684\u5355\u4e00\u94fe\u8def\u3002\u4f46\u662f\u5982\u679c\u4f7f\u7528update-rc.d\uff0c\u5219\u975e\u5e38\u7b80\u5355\uff1a<br \/>\nupdate-rc.d -f apache2 remove<br \/>\n\u53c2\u6570-f\u662f\u5f3a\u5236\u5220\u9664\u7b26\u53f7\u94fe\u63a5\uff0c\u5373\u4f7f\/etc\/init.d\/apache2\u4ecd\u7136\u5b58\u5728\u3002 Note\uff1a\u8fd9\u4e2a\u547d\u4ee4\u4ec5\u4ec5\u7981\u6b62\u8be5\u670d\u52a1\uff0c\u76f4\u5230\u8be5\u670d\u52a1\u88ab\u5347\u7ea7\u3002\u5982\u679c\u4f60\u60f3\u5728\u670d\u52a1\u5347\u7ea7\u540e\u4ecd\u7136\u4fdd\u6301\u88ab\u7981\u7528\u3002\u5e94\u8be5\u6267\u884c\u5982\u4e0b\u7684\u547d\u4ee4\uff1a<br \/>\nupdate-rc.d apache2 stop 80 0 1 2 3 4 5 6 .<br \/>\n<strong>2\u3001\u589e\u52a0\u4e00\u4e2a\u670d\u52a1<\/strong><br \/>\n\u5982\u679c\u4f60\u60f3\u91cd\u65b0\u6dfb\u52a0\u8fd9\u4e2a\u670d\u52a1\u5e76\u8ba9\u5b83\u5f00\u673a\u81ea\u52a8\u6267\u884c\uff0c\u4f60\u9700\u8981\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<br \/>\nupdate-rc.d apache2 defaults<br \/>\n\u5e76\u4e14\u53ef\u4ee5\u6307\u5b9a\u8be5\u670d\u52a1\u7684\u542f\u52a8\u987a\u5e8f\uff1a<br \/>\nupdate-rc.d apache2 defaults 90<br \/>\n\u8fd8\u53ef\u4ee5\u66f4\u8be6\u7ec6\u7684\u63a7\u5236start\u4e0ekill\u987a\u5e8f\uff1a<br \/>\nupdate-rc.d apache2 defaults 20 80<br \/>\n\u5176\u4e2d\u524d\u9762\u768420\u662fstart\u65f6\u7684\u8fd0\u884c\u987a\u5e8f\u7ea7\u522b\uff0c80\u4e3akill\u65f6\u7684\u7ea7\u522b\u3002\u4e5f\u53ef\u4ee5\u5199\u6210\uff1a<br \/>\nupdate-rc.d apache2 start 20 2 3 4 5 . stop 80 0 1 6 .<br \/>\n\u5176\u4e2d0\uff5e6\u4e3a\u8fd0\u884c\u7ea7\u522b\u3002 update-rc.d\u547d\u4ee4\u4e0d\u4ec5\u9002\u7528Linux\u670d\u52a1\uff0c\u7f16\u5199\u7684\u811a\u672c\u540c\u6837\u53ef\u4ee5\u7528\u8fd9\u4e2a\u547d\u4ee4\u8bbe\u4e3a\u5f00\u673a\u81ea\u52a8\u8fd0\u884c<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728Linux\u7cfb\u7edf\u4e0b\uff0c\u4e00\u4e2aServices\u7684\u542f\u52a8\u3001\u505c\u6b62\u4ee5\u53ca\u91cd\u542f\u901a\u5e38\u662f\u901a\u8fc7\/etc\/init.d\u76ee\u5f55\u4e0b\u7684\u811a\u672c\u6765\u63a7\u5236 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-525","post","type-post","status-publish","format-standard","hentry","category-Technical_literature"],"views":1283,"_links":{"self":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/comments?post=525"}],"version-history":[{"count":0,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/posts\/525\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/media?parent=525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/categories?post=525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datarelab.com\/blog\/wp-json\/wp\/v2\/tags?post=525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}