{"id":312,"date":"2013-06-01T21:35:33","date_gmt":"2013-06-01T21:35:33","guid":{"rendered":"950a4152c2b4aa3ad78bdd6b366cc179"},"modified":"2013-06-01T21:35:33","modified_gmt":"2013-06-01T21:35:33","slug":"","status":"publish","type":"post","link":"https:\/\/www.xiaobo.li\/notes\/archives\/312","title":{"rendered":"linux chkconfig \u542f\u52a8\u987a\u5e8f"},"content":{"rendered":"<p><strong>1\uff09redhat\u7684\u542f\u52a8\u65b9\u5f0f\u548c\u6267\u884c\u6b21\u5e8f\u662f\uff1a&nbsp;<\/strong><\/p>\n<p>\u52a0\u8f7d\u5185\u6838&nbsp;\u6267\u884cinit\u7a0b\u5e8f&nbsp;<br \/>\n\/etc\/rc.d\/rc.sysinit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp;\u7531init\u6267\u884c\u7684\u7b2c\u4e00\u4e2a\u811a\u672c&nbsp;<br \/>\n\/etc\/rc.d\/rc&nbsp;$RUNLEVEL&nbsp; #&nbsp;$RUNLEVEL\u4e3a\u7f3a\u7701\u7684\u8fd0\u884c\u6a21\u5f0f&nbsp;<br \/>\n\/etc\/rc.d\/rc.local&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #\u76f8\u5e94\u7ea7\u522b\u670d\u52a1\u542f\u52a8\u4e4b\u540e\u3001\u5728\u6267\u884c\u8be5\u6587\u4ef6\uff08\u5176\u5b9e\u4e5f\u53ef\u4ee5\u628a\u9700\u8981\u6267\u884c\u7684\u547d\u4ee4\u5199\u5230\u8be5\u6587\u4ef6\u4e2d\uff09&nbsp;\/sbin\/mingetty&nbsp;#&nbsp;\u7b49\u5f85\u7528\u6237\u767b\u5f55<br \/>\n\u5728Redhat\u4e2d\uff0c\/etc\/rc.d\/rc.sysinit\u4e3b\u8981\u505a\u5728\u5404\u4e2a\u8fd0\u884c\u6a21\u5f0f\u4e2d\u76f8\u540c\u7684\u521d\u59cb\u5316\u5de5\u4f5c\uff0c\u5305\u62ec\uff1a&nbsp;\u8c03\u5165keymap\u4ee5\u53ca\u7cfb\u7edf\u5b57\u4f53&nbsp;\u542f\u52a8swapping&nbsp;\u8bbe\u7f6e\u4e3b\u673a\u540d&nbsp;\u8bbe\u7f6eNIS\u57df\u540d&nbsp;<br \/>\n\u68c0\u67e5\uff08fsck\uff09\u5e76mount\u6587\u4ef6\u7cfb\u7edf\u6253\u5f00quota&nbsp;\u88c5\u8f7d\u58f0\u5361\u6a21\u5757\u8bbe\u7f6e\u7cfb\u7edf\u65f6\u949f\u7b49\u7b49\u3002&nbsp;<br \/>\n\/etc\/rc.d\/rc\u5219\u6839\u636e\u5176\u53c2\u6570\u6307\u5b9a\u7684\u8fd0\u884c\u6a21\u5f0f(\u8fd0\u884c\u7ea7\u522b\uff0c\u4f60\u5728inittab\u6587\u4ef6\u4e2d\u53ef\u4ee5\u8bbe\u7f6e)\u6765\u6267\u884c\u76f8\u5e94\u76ee\u5f55\u4e0b\u7684\u811a\u672c\u3002<br \/>\n\u51e1\u662f\u4ee5<strong>Kxx<\/strong>\u5f00\u5934\u7684&nbsp;\uff0c\u90fd\u4ee5stop\u4e3a\u53c2\u6570\u6765\u8c03\u7528\uff1b\u51e1\u662f\u4ee5<strong>Sxx<\/strong>\u5f00\u5934\u7684\uff0c\u90fd\u4ee5start\u4e3a\u53c2\u6570\u6765\u8c03\u7528\u3002<\/p>\n<p>\u8c03\u7528\u7684\u987a\u5e8f\u6309<strong>xx<\/strong>&nbsp;\u4ece\u5c0f\u5230\u5927\u6765\u6267\u884c\u3002<br \/>\n(\u5176\u4e2dxx\u662f\u6570\u5b57\u3001\u8868\u793a\u7684\u662f\u542f\u52a8\u987a\u5e8f)\u4f8b\u5982\uff0c\u5047\u8bbe\u7f3a\u7701\u7684\u8fd0\u884c\u6a21\u5f0f\u662f3\uff0c\/etc\/rc.d\/rc\u5c31\u4f1a\u6309\u4e0a\u8ff0\u65b9\u5f0f\u8c03\u7528&nbsp;<br \/>\n\/etc\/rc.d\/rc3.d\/\u4e0b\u7684\u811a\u672c\u3002&nbsp;<br \/>\n\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0cRedhat\u4e2d\u7684\u8fd0\u884c\u6a21\u5f0f2\u30013\u30015\u90fd\u628a\/etc\/rc.d\/rc.local\u505a\u4e3a\u521d\u59cb\u5316\u811a\u672c\u4e2d&nbsp;<br \/>\n\u7684\u6700\u540e\u4e00\u4e2a\uff0c\u6240\u4ee5\u7528\u6237\u53ef\u4ee5\u81ea\u5df1\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4e00\u4e9b\u9700\u8981\u5728\u5176\u4ed6\u521d\u59cb\u5316\u5de5\u4f5c\u4e4b\u540e\uff0c\u767b\u5f55\u4e4b\u524d\u6267\u884c\u7684\u547d\u4ee4\u3002&nbsp;init\u5728\u7b49\u5f85\/etc\/rc.d\/rc\u6267\u884c\u5b8c\u6bd5\u4e4b\u540e\uff08\u56e0\u4e3a\u5728\/etc\/inittab\u4e2d\/etc\/rc.d\/rc\u7684&nbsp;<br \/>\naction\u662fwait\uff09\uff0c\u5c06\u5728\u6307\u5b9a\u7684\u5404\u4e2a\u865a\u62df\u7ec8\u7aef\u4e0a\u8fd0\u884c\/sbin\/mingetty\uff0c\u7b49\u5f85\u7528\u6237\u7684\u767b\u5f55\u3002&nbsp;\u81f3\u6b64\uff0cLINUX\u7684\u542f\u52a8\u7ed3\u675f\u3002&nbsp;<\/p>\n<p><strong>2\uff09init\u8fd0\u884c\u7ea7\u522b\u53ca\u6307\u4ee4&nbsp;\u4e00\u3001\u4ec0\u4e48\u662fINIT:&nbsp;<br \/>\n<\/strong>init\u662fLinux\u7cfb\u7edf\u64cd\u4f5c\u4e2d\u4e0d\u53ef\u7f3a\u5c11\u7684\u7a0b\u5e8f\u4e4b\u4e00\u3002&nbsp;<br \/>\n\u6240\u8c13\u7684init\u8fdb\u7a0b\uff0c\u5b83\u662f\u4e00\u4e2a\u7531\u5185\u6838\u542f\u52a8\u7684\u7528\u6237\u7ea7\u8fdb\u7a0b\u3002&nbsp;<br \/>\n\u5185\u6838\u81ea\u884c\u542f\u52a8\uff08\u5df2\u7ecf\u88ab\u8f7d\u5165\u5185\u5b58\uff0c\u5f00\u59cb\u8fd0\u884c\uff0c\u5e76\u5df2\u521d\u59cb\u5316\u6240\u6709\u7684\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u548c\u6570\u636e\u7ed3\u6784\u7b49\uff09\u4e4b\u540e\uff0c\u5c31\u901a\u8fc7\u542f\u52a8\u4e00\u4e2a\u7528\u6237\u7ea7\u7a0b\u5e8finit\u7684\u65b9\u5f0f\uff0c\u5b8c\u6210\u5f15\u5bfc\u8fdb\u7a0b\u3002\u6240\u4ee5,init\u59cb\u7ec8\u662f\u7b2c\u4e00\u4e2a\u8fdb\u7a0b\uff08\u5176\u8fdb\u7a0b\u7f16\u53f7\u59cb\u7ec8\u4e3a1\uff09\u3002&nbsp;<br \/>\n\u5185\u6838\u4f1a\u5728\u8fc7\u53bb\u66fe\u4f7f\u7528\u8fc7init\u7684\u51e0\u4e2a\u5730\u65b9\u67e5\u627e\u5b83\uff0c\u5b83\u7684\u6b63\u786e\u4f4d\u7f6e\uff08\u5bf9Linux\u7cfb\u7edf\u6765\u8bf4\uff09\u662f\/sbin\/init\u3002\u5982\u679c\u5185\u6838\u627e\u4e0d\u5230init\uff0c\u5b83\u5c31\u4f1a\u8bd5\u7740\u8fd0\u884c\/bin\/sh\uff0c\u5982\u679c\u8fd0\u884c\u5931\u8d25\uff0c\u7cfb\u7edf\u7684\u542f\u52a8\u4e5f\u4f1a\u5931\u8d25\u3002&nbsp;<br \/>\n<strong>\u4e8c\u3001\u8fd0\u884c\u7ea7\u522b<\/strong><br \/>\n\u90a3\u4e48\uff0c\u5230\u5e95\u4ec0\u4e48\u662f\u8fd0\u884c\u7ea7\u5462\uff1f&nbsp;<br \/>\n\u7b80\u5355\u7684\u8bf4\uff0c\u8fd0\u884c\u7ea7\u5c31\u662f\u64cd\u4f5c\u7cfb\u7edf\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u7684\u529f\u80fd\u7ea7\u522b\u3002<\/p>\n<p>\u8fd9\u4e2a\u7ea7\u522b\u4ece1\u52306&nbsp;\uff0c\u5177\u6709\u4e0d\u540c\u7684\u529f\u80fd\u3002&nbsp;\u4e0d\u540c\u7684\u8fd0\u884c\u7ea7\u5b9a\u4e49\u5982\u4e0b&nbsp;<br \/>\n#&nbsp;0&nbsp;-\u505c\u673a\uff08\u5343\u4e07\u4e0d\u80fd\u628ainitdefault&nbsp;\u8bbe\u7f6e\u4e3a0&nbsp;\uff09&nbsp;<br \/>\n#&nbsp;1&nbsp;-\u5355\u7528\u6237\u6a21\u5f0f&nbsp;#&nbsp;s&nbsp;init&nbsp;s&nbsp;=&nbsp;init&nbsp;1&nbsp;<br \/>\n#&nbsp;2&nbsp;-\u591a\u7528\u6237\uff0c\u6ca1\u6709&nbsp;NFS&nbsp;<br \/>\n#&nbsp;3&nbsp;-\u5b8c\u5168\u591a\u7528\u6237\u6a21\u5f0f(\u6807\u51c6\u7684\u8fd0\u884c\u7ea7)&nbsp;<br \/>\n#&nbsp;4&nbsp;-\u6ca1\u6709\u7528\u5230&nbsp;<br \/>\n#&nbsp;5&nbsp;-X11&nbsp;\u591a\u7528\u6237\u56fe\u5f62\u6a21\u5f0f\uff08xwindow)&nbsp;<br \/>\n#&nbsp;6&nbsp;-\u91cd\u65b0\u542f\u52a8&nbsp;\uff08\u5343\u4e07\u4e0d\u8981\u628ainitdefault&nbsp;\u8bbe\u7f6e\u4e3a6&nbsp;\uff09&nbsp;<br \/>\n\u8fd9\u4e9b\u7ea7\u522b\u5728\/etc\/inittab&nbsp;\u6587\u4ef6\u91cc\u6307\u5b9a\u3002<br \/>\n\u8fd9\u4e2a\u6587\u4ef6\u662finit&nbsp;\u7a0b\u5e8f\u5bfb\u627e\u7684\u4e3b\u8981\u6587\u4ef6\uff0c\u6700\u5148\u8fd0\u884c\u7684\u670d\u52a1\u662f\u653e<br \/>\n\u5728\/etc\/rc.d&nbsp;\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u3002<br \/>\n\u5728\u5927\u591a\u6570\u7684Linux&nbsp;\u53d1\u884c\u7248\u672c\u4e2d\uff0c\u542f\u52a8\u811a\u672c\u90fd\u662f\u4f4d\u4e8e&nbsp;\/etc\/rc.d\/init.d\u4e2d\u7684\u3002<br \/>\n\u8fd9\u4e9b\u811a\u672c\u88ab\u7528ln&nbsp;\u547d\u4ee4\u8fde\u63a5\u5230&nbsp;\/etc\/rc.d\/rcn.d&nbsp;\u76ee\u5f55\u3002(\u8fd9\u91cc\u7684n&nbsp;\u5c31\u662f\u8fd0\u884c\u7ea70-6)&nbsp;3\uff09\uff1a<br \/>\n---------------------------<\/p>\n<p>chkconfig\u547d\u4ee4\u4e3b\u8981\u7528\u6765\u66f4\u65b0\uff08\u542f\u52a8\u6216\u505c\u6b62\uff09\u548c\u67e5\u8be2\u7cfb\u7edf\u670d\u52a1\u7684\u8fd0\u884c\u7ea7\u4fe1\u606f\u3002\u8c28\u8bb0chkconfig\u4e0d\u662f\u7acb\u5373\u81ea\u52a8\u7981\u6b62\u6216\u6fc0\u6d3b\u4e00\u4e2a\u670d\u52a1\uff0c\u5b83\u53ea\u662f\u7b80\u5355\u7684\u6539\u53d8\u4e86\u7b26\u53f7\u8fde\u63a5\u3002<\/p>\n<p>\u4f7f\u7528\u8bed\u6cd5\uff1a<br \/>\nchkconfig [--add][--del][--list][\u7cfb\u7edf\u670d\u52a1] \u6216 chkconfig [--level &lt;\u7b49\u7ea7\u4ee3\u53f7&gt;][\u7cfb\u7edf\u670d\u52a1][on\/off\/reset]<\/p>\n<p>chkconfig\u5728\u6ca1\u6709\u53c2\u6570\u8fd0\u884c\u65f6\uff0c\u663e\u793a\u7528\u6cd5\u3002\u5982\u679c\u52a0\u4e0a\u670d\u52a1\u540d\uff0c\u90a3\u4e48\u5c31\u68c0\u67e5\u8fd9\u4e2a\u670d\u52a1\u662f\u5426\u5728\u5f53\u524d\u8fd0\u884c\u7ea7\u542f\u52a8\u3002\u5982\u679c\u662f\uff0c\u8fd4\u56detrue\uff0c\u5426\u5219\u8fd4\u56defalse\u3002\u5982\u679c\u5728\u670d\u52a1\u540d\u540e\u9762\u6307\u5b9a\u4e86on\uff0coff\u6216\u8005reset\uff0c\u90a3\u4e48chkconfi \u4f1a\u6539\u53d8\u6307\u5b9a\u670d\u52a1\u7684\u542f\u52a8\u4fe1\u606f\u3002on\u548coff\u5206\u522b\u6307\u670d\u52a1\u88ab\u542f\u52a8\u548c\u505c\u6b62\uff0creset\u6307\u91cd\u7f6e\u670d\u52a1\u7684\u542f\u52a8\u4fe1\u606f\uff0c\u65e0\u8bba\u6709\u95ee\u9898\u7684\u521d\u59cb\u5316\u811a\u672c\u6307\u5b9a\u4e86\u4ec0\u4e48\u3002on\u548coff\u5f00\u5173\uff0c\u7cfb\u7edf\u9ed8\u8ba4\u53ea\u5bf9\u8fd0\u884c\u7ea73\uff0c4\uff0c5\u6709\u6548\uff0c\u4f46\u662freset\u53ef\u4ee5\u5bf9\u6240\u6709\u8fd0\u884c\u7ea7\u6709\u6548\u3002<\/p>\n<p>\u53c2\u6570\u7528\u6cd5\uff1a<br \/>\n&nbsp;&nbsp; --add \u3000\u589e\u52a0\u6240\u6307\u5b9a\u7684\u7cfb\u7edf\u670d\u52a1\uff0c\u8ba9chkconfig\u6307\u4ee4\u5f97\u4ee5\u7ba1\u7406\u5b83\uff0c\u5e76\u540c\u65f6\u5728\u7cfb\u7edf\u542f\u52a8\u7684\u53d9\u8ff0\u6587\u4ef6\u5185\u589e\u52a0\u76f8\u5173\u6570\u636e\u3002<br \/>\n&nbsp;&nbsp; --del \u3000\u5220\u9664\u6240\u6307\u5b9a\u7684\u7cfb\u7edf\u670d\u52a1\uff0c\u4e0d\u518d\u7531chkconfig\u6307\u4ee4\u7ba1\u7406\uff0c\u5e76\u540c\u65f6\u5728\u7cfb\u7edf\u542f\u52a8\u7684\u53d9\u8ff0\u6587\u4ef6\u5185\u5220\u9664\u76f8\u5173\u6570\u636e\u3002<br \/>\n&nbsp;&nbsp; --level&lt;\u7b49\u7ea7\u4ee3\u53f7&gt; \u3000\u6307\u5b9a\u8bfb\u7cfb\u7edf\u670d\u52a1\u8981\u5728\u54ea\u4e00\u4e2a\u6267\u884c\u7b49\u7ea7\u4e2d\u5f00\u542f\u6216\u5173\u6bd5\u3002<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u7b49\u7ea70\u8868\u793a\uff1a\u8868\u793a\u5173\u673a<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u7b49\u7ea71\u8868\u793a\uff1a\u5355\u7528\u6237\u6a21\u5f0f<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u7b49\u7ea72\u8868\u793a\uff1a\u65e0\u7f51\u7edc\u8fde\u63a5\u7684\u591a\u7528\u6237\u547d\u4ee4\u884c\u6a21\u5f0f<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u7b49\u7ea73\u8868\u793a\uff1a\u6709\u7f51\u7edc\u8fde\u63a5\u7684\u591a\u7528\u6237\u547d\u4ee4\u884c\u6a21\u5f0f<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u7b49\u7ea74\u8868\u793a\uff1a\u4e0d\u53ef\u7528<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u7b49\u7ea75\u8868\u793a\uff1a\u5e26\u56fe\u5f62\u754c\u9762\u7684\u591a\u7528\u6237\u6a21\u5f0f<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u7b49\u7ea76\u8868\u793a\uff1a\u91cd\u65b0\u542f\u52a8<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u9700\u8981\u8bf4\u660e\u7684\u662f\uff0clevel\u9009\u9879\u53ef\u4ee5\u6307\u5b9a\u8981\u67e5\u770b\u7684\u8fd0\u884c\u7ea7\u800c\u4e0d\u4e00\u5b9a\u662f\u5f53\u524d\u8fd0\u884c\u7ea7\u3002\u5bf9\u4e8e\u6bcf\u4e2a\u8fd0\u884c\u7ea7\uff0c\u53ea\u80fd\u6709\u4e00\u4e2a\u542f\u52a8\u811a\u672c\u6216\u8005\u505c\u6b62\u811a\u672c\u3002\u5f53\u5207\u6362\u8fd0\u884c\u7ea7\u65f6\uff0cinit\u4e0d\u4f1a\u91cd\u65b0\u542f\u52a8\u5df2\u7ecf\u542f\u52a8\u7684\u670d\u52a1\uff0c\u4e5f\u4e0d\u4f1a\u518d\u6b21\u53bb\u505c\u6b62\u5df2\u7ecf\u505c\u6b62\u7684\u670d\u52a1\u3002<\/p>\n<p>&nbsp;&nbsp;&nbsp; chkconfig --list [name]\uff1a\u663e\u793a\u6240\u6709\u8fd0\u884c\u7ea7\u7cfb\u7edf\u670d\u52a1\u7684\u8fd0\u884c\u72b6\u6001\u4fe1\u606f\uff08on\u6216off\uff09\u3002\u5982\u679c\u6307\u5b9a\u4e86name\uff0c\u90a3\u4e48\u53ea\u663e\u793a\u6307\u5b9a\u7684\u670d\u52a1\u5728\u4e0d\u540c\u8fd0\u884c\u7ea7\u7684\u72b6\u6001\u3002<br \/>\n&nbsp;&nbsp;&nbsp; chkconfig --add name\uff1a\u589e\u52a0\u4e00\u9879\u65b0\u7684\u670d\u52a1\u3002chkconfig\u786e\u4fdd\u6bcf\u4e2a\u8fd0\u884c\u7ea7\u6709\u4e00\u9879\u542f\u52a8(S)\u6216\u8005\u6740\u6b7b(K)\u5165\u53e3\u3002\u5982\u6709\u7f3a\u5c11\uff0c\u5219\u4f1a\u4ece\u7f3a\u7701\u7684init\u811a\u672c\u81ea\u52a8\u5efa\u7acb\u3002<br \/>\n&nbsp;&nbsp;&nbsp; chkconfig --del name\uff1a\u5220\u9664\u670d\u52a1\uff0c\u5e76\u628a\u76f8\u5173\u7b26\u53f7\u8fde\u63a5\u4ece\/etc\/rc[0-6].d\u5220\u9664\u3002<br \/>\n&nbsp;&nbsp;&nbsp; chkconfig [--level levels] name\uff1a\u8bbe\u7f6e\u67d0\u4e00\u670d\u52a1\u5728\u6307\u5b9a\u7684\u8fd0\u884c\u7ea7\u662f\u88ab\u542f\u52a8\uff0c\u505c\u6b62\u8fd8\u662f\u91cd\u7f6e\u3002<\/p>\n<p>\u8fd0\u884c\u7ea7\u6587\u4ef6\uff1a<br \/>\n\u6bcf\u4e2a\u88abchkconfig\u7ba1\u7406\u7684\u670d\u52a1\u9700\u8981\u5728\u5bf9\u5e94\u7684init.d\u4e0b\u7684\u811a\u672c\u52a0\u4e0a\u4e24\u884c\u6216\u8005\u66f4\u591a\u884c\u7684\u6ce8\u91ca\u3002\u7b2c\u4e00\u884c\u544a\u8bc9chkconfig\u7f3a\u7701\u542f\u52a8\u7684\u8fd0\u884c\u7ea7\u4ee5\u53ca\u542f\u52a8\u548c\u505c\u6b62\u7684\u4f18\u5148\u7ea7\u3002\u5982\u679c\u67d0\u670d\u52a1\u7f3a\u7701\u4e0d\u5728\u4efb\u4f55\u8fd0\u884c\u7ea7\u542f\u52a8\uff0c\u90a3\u4e48\u4f7f\u7528 - \u4ee3\u66ff\u8fd0\u884c\u7ea7\u3002\u7b2c\u4e8c\u884c\u5bf9\u670d\u52a1\u8fdb\u884c\u63cf\u8ff0\uff0c\u53ef\u4ee5\u7528\\ \u8de8\u884c\u6ce8\u91ca\u3002<br \/>\n\u4f8b\u5982\uff0crandom.init\u5305\u542b\u4e09\u884c\uff1a<br \/>\n# chkconfig: 2345 20 80<br \/>\n# description: Saves and restores system entropy pool for \\<br \/>\n# higher quality random number generation.<\/p>\n<p>\u4f7f\u7528\u8303\u4f8b\uff1a<br \/>\nchkconfig --list&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #\u5217\u51fa\u6240\u6709\u7684\u7cfb\u7edf\u670d\u52a1<br \/>\nchkconfig --add httpd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #\u589e\u52a0httpd\u670d\u52a1<br \/>\nchkconfig --del httpd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #\u5220\u9664httpd\u670d\u52a1<br \/>\nchkconfig --level httpd 2345 on&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #\u8bbe\u7f6ehttpd\u5728\u8fd0\u884c\u7ea7\u522b\u4e3a2\u30013\u30014\u30015\u7684\u60c5\u51b5\u4e0b\u90fd\u662fon\uff08\u5f00\u542f\uff09\u7684\u72b6\u6001<br \/>\nchkconfig --list&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #\u5217\u51fa\u7cfb\u7edf\u6240\u6709\u7684\u670d\u52a1\u542f\u52a8\u60c5\u51b5<br \/>\nchkconfig --list mysqld&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #\u5217\u51famysqld\u670d\u52a1\u8bbe\u7f6e\u60c5\u51b5<br \/>\nchkconfig --level 35 mysqld on&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #\u8bbe\u5b9amysqld\u5728\u7b49\u7ea73\u548c5\u4e3a\u5f00\u673a\u8fd0\u884c\u670d\u52a1\uff0c--level 35\u8868\u793a\u64cd\u4f5c\u53ea\u5728\u7b49\u7ea73\u548c5\u6267\u884c\uff0con\u8868\u793a\u542f\u52a8\uff0coff\u8868\u793a\u5173\u95ed<br \/>\nchkconfig mysqld on&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #\u8bbe\u5b9amysqld\u5728\u5404\u7b49\u7ea7\u4e3aon\uff0c\u201c\u5404\u7b49\u7ea7\u201d\u5305\u62ec2\u30013\u30014\u30015\u7b49\u7ea7<\/p>\n<p>\u5982\u4f55\u589e\u52a0\u4e00\u4e2a\u670d\u52a1\uff1a<br \/>\n1.\u670d\u52a1\u811a\u672c\u5fc5\u987b\u5b58\u653e\u5728\/etc\/ini.d\/\u76ee\u5f55\u4e0b\uff1b<br \/>\n2.chkconfig --add servicename<br \/>\n&nbsp;&nbsp;&nbsp; \u5728chkconfig\u5de5\u5177\u670d\u52a1\u5217\u8868\u4e2d\u589e\u52a0\u6b64\u670d\u52a1\uff0c\u6b64\u65f6\u670d\u52a1\u4f1a\u88ab\u5728\/etc\/rc.d\/rcN.d\u4e2d\u8d4b\u4e88K\/S\u5165\u53e3\u4e86\uff1b<br \/>\n3.chkconfig --level 35 mysqld on<br \/>\n&nbsp;&nbsp;&nbsp; \u4fee\u6539\u670d\u52a1\u7684\u9ed8\u8ba4\u542f\u52a8\u7b49\u7ea7\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>chkconfig\u547d\u4ee4\u4e3b\u8981\u7528\u6765\u66f4\u65b0\uff08\u542f\u52a8\u6216\u505c\u6b62\uff09\u548c\u67e5\u8be2\u7cfb\u7edf\u670d\u52a1\u7684\u8fd0\u884c\u7ea7\u4fe1\u606f\u3002\u8c28\u8bb0chkconfig\u4e0d\u662f\u7acb\u5373\u81ea\u52a8\u7981\u6b62\u6216\u6fc0\u6d3b\u4e00\u4e2a\u670d\u52a1\uff0c\u5b83\u53ea\u662f\u7b80\u5355\u7684\u6539\u53d8\u4e86\u7b26\u53f7\u8fde\u63a5\u3002<\/p>\n<p>\u4f7f\u7528\u8bed\u6cd5\uff1a<br \/>\nchkconfig [--add][--del][--list][\u7cfb\u7edf\u670d\u52a1] \u6216 chkconfig [--level &lt;\u7b49\u7ea7\u4ee3\u53f7&gt;][\u7cfb\u7edf\u670d\u52a1][on\/off\/reset]<\/p>\n<p>chkconfig\u5728\u6ca1\u6709\u53c2\u6570\u8fd0\u884c\u65f6\uff0c\u663e\u793a\u7528\u6cd5\u3002\u5982\u679c\u52a0\u4e0a\u670d\u52a1\u540d\uff0c\u90a3\u4e48\u5c31\u68c0\u67e5\u8fd9\u4e2a\u670d\u52a1\u662f\u5426\u5728\u5f53\u524d\u8fd0\u884c\u7ea7\u542f\u52a8\u3002\u5982\u679c\u662f\uff0c\u8fd4\u56detrue\uff0c\u5426\u5219\u8fd4\u56defalse\u3002\u5982\u679c\u5728\u670d\u52a1\u540d\u540e\u9762\u6307\u5b9a\u4e86on\uff0coff\u6216\u8005reset\uff0c\u90a3\u4e48chkconfi \u4f1a\u6539\u53d8\u6307\u5b9a\u670d\u52a1\u7684\u542f\u52a8\u4fe1\u606f\u3002...<\/p>\n<p> <a href=\"https:\/\/www.xiaobo.li\/notes\/archives\/312\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[287],"tags":[129],"class_list":["post-312","post","type-post","status-publish","format-standard","hentry","category-linux","tag-chkconfig"],"_links":{"self":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/312","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/comments?post=312"}],"version-history":[{"count":0,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/posts\/312\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/media?parent=312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/categories?post=312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xiaobo.li\/notes\/wp-json\/wp\/v2\/tags?post=312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}