{"id":1062,"date":"2010-03-08T11:10:00","date_gmt":"2010-03-08T03:10:00","guid":{"rendered":"\/?p=1062"},"modified":"2010-03-08T11:10:00","modified_gmt":"2010-03-08T11:10:00","slug":"1062","status":"publish","type":"post","link":"https:\/\/blog.vimge.com\/archives\/linux\/1062.html","title":{"rendered":"chkconfig\u7ba1\u7406Init\u811a\u672c"},"content":{"rendered":"
\u6ce8\u518c\u5e76\u7ba1\u7406Linux\u7cfb\u7edf\u521d\u59cb\u5316\u7684\u65f6\u5019\u542f\u52a8\u7684\u670d\u52a1,chkconfig\u786e\u5b9e\u662f\u4e00\u4e2a\u6bd4\u8f83\u65b9\u4fbf\u7684\u5de5\u5177.<\/p>\n
\u5148\u4e86\u89e3\u4e00\u4e0b\u57fa\u672c\u77e5\u8bc6\u5427
id:runlevel:action:process <\/p>\n
id \u4ee3\u8868\u7528\u6237\u5b9a\u4e49\u7684\u552f\u4e00\u7684\u6807\u5fd7 <\/p>\n
runlevel \u53ef\u4ee5\u4f7f0-6\u7684\u7ec4\u5408 \u6216\u8005\u4e3a\u7a7a <\/p>\n
action \u6765\u81ea\u4e00\u4e2a\u5173\u952e\u8bcdkeyword \u63cf\u8ff0init\u5982\u4f55\u5bf9\u5f85process <\/p>\n
process \u662f\u8981\u6267\u884c\u7684\u547d\u4ee4 <\/p>\n
\u63cf\u8ff0 action \u5b57\u6bb5\u7684\u5404\u79cd\u5173\u952e\u5b57\u53ef\u4ee5\u5728 inittab \u7684\u624b\u518c\u4e2d\u627e\u5230\u3002\u5e38\u7528\u7684\u5173\u952e\u5b57\uff0c\u4e0d\u662f\u5168\u90e8\uff0cUNIX \u5e73\u53f0\u5305\u62ec\u8fd9\u4e9b: <\/p>\n
initdefault \u5b9a\u4e49\u4e00\u4e2a\u7cfb\u7edf\u542f\u52a8\u540e\u8fdb\u5165\u7684\u8fd0\u884c\u7ea7 <\/p>\n
wait \u4f1a\u88ab\u6267\u884c\u4e00\u6b21\u7684\u8fdb\u7a0b (\u5f53\u8fdb\u5165\u8fd0\u884c\u7ea7\u7684\u65f6\u5019)\u3002init \u8fdb\u7a0b\u5c06\u7b49\u5f85\u8fd9\u4e2a\u8fdb\u7a0b\u88ab\u7ec8\u6b62 <\/p>\n
boot \u5b9a\u4e49\u4e00\u4e2a\u542f\u52a8\u7684\u65f6\u5019\u6267\u884c\u7684\u8fdb\u7a0b <\/p>\n
bootwait \u4e0e boot \u7c7b\u4f3c \uff0c\u4e0d\u8fc7 init\u5728\u7ee7\u7eed\u8fd0\u884c\u524d\u7b49\u5f85\u8fdb\u7a0b\u7684\u7ec8\u6b62 <\/p>\n
sysinit \u5b9a\u4e49\u4e00\u4e2a\u8fdb\u7a0b\u5728 boot\u7684\u65f6\u5019\u6267\u884c\uff0c\u5728\u4efb\u4f55 boot\u6216\u8005bootwait inittab \u6761\u76ee\u7684\u524d\u9762\u6267\u884c\u3002 <\/p>\n
runlevel \u5b57\u6bb5\u6307\u660e\u7cfb\u7edf\u72b6\u6001\u3002\u4f8b\u5982\uff0c\u8fd0\u884c\u7ea7 0 \u4ee3\u8868\u7cfb\u7edf\u5173\u673a\uff0c\u8fd0\u884c\u7ea7 6 \u4ee3\u8868\u7cfb\u7edf\u91cd\u542f \u3002\u4e0d\u5e78\u7684\u662f\uff0c\u4e0d\u662f\u6240\u6709\u7684 Linux \u53d1\u5e03\u90fd\u9075\u5faa\u540c\u6837\u7684\u8fd0\u884c\u7ea7\u5b9a\u4e49 \u3002\u5728 Red Hat \u4e2d\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u652f\u6301\u4e0b\u9762\u8fd9\u4e9b <\/p>\n
0. \u7cfb\u7edf\u6302\u8d77 <\/p>\n
1. \u4f46\u7528\u6237Single-user mode <\/p>\n
2. \u591a\u7528\u6237\uff0c\u6ca1\u6709NFS <\/p>\n
3. \u5b8c\u6574\u7684\u591a\u7528\u6237Complete multiuser mode <\/p>\n
4. \u7528\u6237\u81ea\u5b9a\u4e49 <\/p>\n
5. X11 (XDM \u767b\u5f55) <\/p>\n
6. \u91cd\u65b0\u542f\u52a8 <\/p>\n
\u6bcf\u4e00\u4e2a\u8fd0\u884c\u7ea7\u5728 \/etc\/rc.d \u4e0b\u90fd\u6709\u4e2a\u76f8\u5e94\u7684\u76ee\u5f55\u3002\u5982\u8fd0\u884c\u7ea7 5\uff0c\u76ee\u5f55\u5c31\u662f \/etc\/rc.d\/rc5.d \u3002\u5305\u542b\u542f\u52a8\u8fd9\u4e2a\u8fd0\u884c\u7ea7\u7684\u65f6\u5019\u8fd0\u884c\u7684\u76f8\u5173\u4efb\u52a1\u7684\u76f8\u5173\u6587\u4ef6\u3002\u5728 Red Hat \u4e2d, \u8fd9\u4e9b\u6587\u4ef6\u4e00\u822c\u90fd\u662f shell \u811a\u672c\u7684\u7b26\u53f7\u8fde\u63a5\uff0c\u53ef\u4ee5\u5728 \/etc\/rc.d\/init.d \u4e2d\u627e\u5230\u3002 <\/p>\n
\u8ba9\u6211\u4eec\u7528\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\u770b\u4e00\u4e0b\u8fd9\u4e9b\u4e1c\u897f\uff0c \u4e0b\u9762\u8fd9\u4e24\u4e2a\u4f8b\u5b50\u884c\u6765\u81ea\u6211\u4eec\u7684 inittab \u6587\u4ef6\uff1a <\/p>\n
id:3:initdefault: <\/p>\n
l3:3:wait:\/etc\/rc.d\/rc 3 <\/p>\n
\u5728 Red Hat \u7cfb\u7edf\u4e2d\u8fd9\u5f88\u5178\u578b\u3002\u4e00\u65e6 init \u88ab\u542f\u52a8 \uff0c\u8bfb\u53d6 \/etc\/inittab \u3002 \u4ece\u7b2c\u4e00\u884c\uff0c\u6211\u4eec\u77e5\u9053 init \u5c06\u5728\u7cfb\u7edf\u542f\u52a8\u540e\u4ece\u8fd0\u884c\u8fd0\u884c\u7ea73\u3002\u4e00\u65e6\u6211\u4eec\u5230\u4e86\u90a3\u4e2a\u8fd0\u884c\u7ea7 \uff0c\u7b2c\u4e8c\u884c\u544a\u8bc9 init \u53bb\u8fd0\u884c\u811a\u672c \/etc\/rc.d\/rc 3 \u5e76\u4e14\u5728\u6267\u884c\u524d\u7b49\u5f85\u7ec8\u6b62\u3002 <\/p>\n
\u5728 \/etc\/rc.d \u76ee\u5f55\u7684 rc \u811a\u672c\u6536\u5230 3 \u4f5c\u4e3a\u4e00\u4e2a\u53c2\u6570\u3002 \u8fd9\u4e2a 3 \u76f8\u5f53\u4e8e\u8fd0\u884c\u7ea7 3\u3002\u7ed3\u679c rc \u811a\u672c\u6267\u884c \/etc\/rc.d\/rc3.d \u76ee\u5f55\u4e2d\u7684\u6240\u6709\u811a\u672c\u3002\u5b83\u9996\u5148\u7528\u53c2\u6570 "stop" \u6267\u884c\u6240\u6709 K\uff08\u4ee3\u8868 "kill"\u6740\u6389\u8fdb\u7a0b\u6216\u8005\u670d\u52a1\uff09\u6253\u5934\u7684\u811a\u672c\uff0c\u63a5\u4e0b\u6765\uff0c\u5b83\u8fd0\u884c\u6240\u6709\u4ee5\u5b57\u6bcd S \u6253\u5934\u7684\u811a\u672c\uff0c\u5e26\u6709\u53c2\u6570 "start" \u542f\u52a8\u8fdb\u7a0b\u6216\u8005\u670d\u52a1\u3002 \u6700\u540e\u8981\u6307\u660e\uff0cK \u548c S \u811a\u672c\u7684\u6267\u884c\u987a\u5e8f\u662f\u57fa\u4e8e\u6392\u5e8f\u7684\uff1b\u540d\u4e3a S90mysql \u7684\u811a\u672c\u5c06\u5728 S95httpd \u4e4b\u524d\u6267\u884c\u3002 <\/p>\n
\/etc\/rc.d\/rc3.d \u4e2d\u7684\u811a\u672c\u5b9e\u9645\u662f\u5bf9 \/etc\/rc.d\/init.d \u4e2d\u6587\u4ef6\u7684\u7b26\u53f7\u8fde\u63a5\u3002UNIX\u7ba1\u7406\u5458\u53ef\u4ee5\u5728rc3.d\u4e2d\u653e\u5236\u6587\u4ef6\uff0c \u5b9e\u9645\u60c5\u51b5\u4e0b Red Hat \u7684 init.d \u76ee\u5f55\u662f\u6240\u6709\u811a\u672c\u7684\u7b2c\u4e00\u4f4d\u7f6e\uff0c\u7136\u540e\u751f\u6210\u903b\u8f91\u8fde\u63a5\u5230 rc*.d \u76ee\u5f55\u3002\u624b\u5de5\u8fdb\u884c\u8fd9\u4e9b\u6587\u4ef6\u7684\u7ba1\u7406\u5f88\u70e6\u4eba\u3001\u7410\u788e\u3002 chkconfig \u73b0\u5728\u63a5\u624b\u8fd9\u4ef6\u4e8b\u60c5! Red Hat \u7684\u8fd9\u4e2a chkconfig \u5de5\u5177\u5c31\u662f\u4e13\u4e3a\u7ba1\u7406 \/etc\/rc.d\/rc[0-6].d \u4e2d\u7684\u7b26\u53f7\u8fde\u63a5\u800c\u8bbe\u8ba1\u3002 <\/p>\n
\u6709\u7684\u65f6\u5019\uff0c \u5220\u6389\u4e00\u4e2a\u670d\u52a1\u4e5f\u5f88\u6070\u5f53\u3002\u4f8b\u5982\uff0c\u9488\u5bf9 sendmail\uff0c\u5728\u5ba2\u6237\u673a\u4e0a\u5bfc\u5165\u672c\u5730\u8d26\u53f7\u7684\u90ae\u4ef6\u6ca1\u6709\u5fc5\u8981\u3002\u8fd0\u884c sendmail \u4f5c\u4e3a\u5b88\u62a4\u8fdb\u7a0b\u5c31\u4e0d\u662f\u5fc5\u8981\u7684\u4e86\u3002\u8fd9\u79cd\u60c5\u51b5\uff0c\u6211\u53d1\u73b0\u7981\u6b62 sendmail \u670d\u52a1\u5f88\u6709\u5fc5\u8981\uff0c\u51cf\u5c11\u4e86\u6f5c\u5728\u7684\u5b89\u5168\u95ee\u9898\uff0c\u4ece chkconfig \u4e2d\u5220\u6389 sendmail\uff0c\u8f93\u5165\uff1a <\/p>\n
chkconfig –del sendmail <\/p>\n
\u5728\u4e0b\u9762\uff0c\u6211\u4eec\u7684 find \u547d\u4ee4\u663e\u793a\u8be5\u5904\u6ca1\u6709\u7b26\u53f7\u8fde\u63a5\u4e86\uff0c\u4e0d\u8fc7 sendmail \u7684 init \u811a\u672c\u4ecd\u7136\u6709\uff1a <\/p>\n
[root]# find \/etc\/rc.d -name ‘*sendmail’ -print <\/p>\n
\/etc\/rc.d\/init.d\/sendmail <\/p>\n
\u5728\u6211\u770b\u6765\u8fd9\u5f88\u5b8c\u7f8e\u3002\u811a\u672c\u4fdd\u7559\u4e86\uff0c\u4e07\u4e00 sendmail \u9700\u8981\u4f5c\u4e3a\u4e00\u4e2a\u670d\u52a1\u5b9e\u73b0\u5462\uff1f\u4e0d\u8fc7\u6240\u6709\u7684\u7b26\u53f7\u8fde\u63a5\u53bb\u6389\u4e86\u3002\u6211\u4eec\u80fd\u5728\u6bcf\u4e00\u4e2a\u8fd0\u884c\u7ea7\u7981\u6b62 sendmail \u670d\u52a1\uff0c\u8fd9\u5c06\u5728\u6bcf\u4e00\u4e2a rc*.d \u5b50\u76ee\u5f55\u4e2d\u653e\u7f6e\u4e00\u4e2a kill \u811a\u672c\uff0c\u867d\u7136 sendmail \u4ece\u4e0d\u5728\u521d\u59cb\u5316\u9636\u6bb5\u542f\u52a8\uff0c\u662f\u4e2a\u4e0d\u5fc5\u8981\u7684\u4efb\u52a1 \uff0c\u53ef\u662f\uff0c\u6211\u66fe\u770b\u5230\u4e00\u4e9b\u7cfb\u7edf\u7ba1\u7406\u5458\u9700\u8981\u5728\u7279\u5b9a\u7684\u573a\u5408\u624b\u5de5\u542f\u52a8\u670d\u52a1\u3002\u628a kill \u811a\u672c\u7559\u5728\u90a3\u91cc\u786e\u4fdd\u53ef\u4ee5\u5e72\u51c0\u7684\u6740\u6389\u670d\u52a1\u3002 <\/p>\n
\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u4e00\u5207\u987a\u5229\u3002\u6211\u4eec\u5df2\u7ecf\u77e5\u9053\u4f7f\u7528 chkconfig \u5982\u4f55\u67e5\u770b\u3001\u8c03\u6574\u3001\u5220\u6389\u670d\u52a1\u3002\u73b0\u5728\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u670d\u52a1\u3002\u770b\u4e0b\u9762\u7684\u811a\u672c oracle: <\/p>\n
Listing 1. Oracle Script <\/p>\n
#!\/bin\/sh <\/p>\n
#chkconfig: 2345 80 05 <\/p>\n
#description: Oracle 8 Server <\/p>\n
ORA_HOME=\/usr\/home\/oracle\/product\/8.0.5 <\/p>\n
ORA_OWNER=oracle <\/p>\n
if [ ! -f $ORA_HOME\/bin\/dbstart ] <\/p>\n
then <\/p>\n
echo "Oracle startup: cannot start" <\/p>\n
exit <\/p>\n
fi <\/p>\n
case "$1" in <\/p>\n
"start") <\/p>\n
su – $ORA_OWNER -c $ORA_HOME\/bin\/dbstart <\/p>\n
su – $ORA_OWNER -c "$ORA_HOME\/bin\/lsnrctl start" <\/p>\n
;; <\/p>\n
"stop") <\/p>\n
su – $ORA_OWNER -c $ORA_HOME\/bin\/dbshut <\/p>\n
su – $ORA_OWNER -c "$ORA_HOME\/bin\/lsnrctl stop" <\/p>\n
;; <\/p>\n
esac <\/p>\n
—————————————————– <\/p>\n
\u4f7f\u7528\u8fd9\u4e2a\u811a\u672c\uff0cOracle 8 \u53ef\u4ee5\u4ee5\u53c2\u6570 "start" \u542f\u52a8\uff0c\u4ee5 "stop" \u53c2\u6570\u505c\u6b62\u3002\u5b83\u7b26\u5408 init \u811a\u672c\u7684\u6700\u5c0f\u8981\u6c42\u53ef\u4ee5\u548c \/etc\/rc.d\/rc \u811a\u672c\u8054\u5408\u4f7f\u7528\u3002 <\/p>\n
\u628a\u811a\u672c\u653e\u5230 \/etc\/rc.d\/init.d \u4e2d\u5e76\u8fd0\u884c(\u4ee5 root) \uff1a <\/p>\n
chmod +x \/etc\/rc.d\/init.d\/oracle <\/p>\n
\u4f7f\u4f60\u7684\u811a\u672c\u53ef\u6267\u884c\u3002\u5982\u679c\u4f60\u62c5\u5fc3\u666e\u901a\u7528\u6237\u5bdf\u770b\u8fd9\u4e2a\u811a\u672c\uff0c\u4f60\u53ef\u4ee5\u8bbe\u5b9a\u66f4\u4e25\u683c\u7684\u6587\u4ef6\u6743\u9650 \u3002\u53ea\u8981\u8fd9\u4e2a\u811a\u672c\u53ef\u4ee5\u88ab root \u4f5c\u4e3a\u5355\u72ec\u7684\u811a\u672c\u8fd0\u884c\u5c31\u53ef\u4ee5\u3002 <\/p>\n
\u6ce8\u610f\u811a\u672c\u4e2d\u7684\u4e24\u884c\u6ce8\u91ca: <\/p>\n
#chkconfig: 2345 80 05 <\/p>\n
#description: Oracle 8 Server <\/p>\n
chkconfig \u9700\u8981\u8fd9\u4e9b\u884c\u6765\u51b3\u5b9a\u5982\u4f55\u5b9e\u73b0\u521d\u59cb\u8fd0\u884c\u7ea7\u6dfb\u52a0\u670d\u52a1\uff0c\u5982\u4f55\u8bbe\u5b9a\u542f\u52a8\u548c\u505c\u6b62\u987a\u5e8f\u7684\u4f18\u5148\u7ea7\u3002\u8fd9\u4e9b\u884c\u6307\u660e\u811a\u672c\u5c06\u4e3a\u8fd0\u884c\u7ea7 2\u30013\u30014\u30015 \u542f\u52a8 Oracle 8 \u670d\u52a1\u3002\u53e6\u5916\uff0c \u542f\u52a8\u4f18\u5148\u6743\u5c06\u88ab\u8bbe\u5b9a\u4e3a 80 \u800c\u505c\u6b62\u4f18\u5148\u6743\u8bbe\u5b9a\u4e3a 05\u3002 <\/p>\n
\u73b0\u5728\u811a\u672c\u5728\u5408\u9002\u7684\u4f4d\u7f6e\uff0c\u5e76\u4e14\u6709\u5408\u9002\u7684\u6267\u884c\u6743\u9650\uff0c\u4ee5\u53ca\u6070\u5f53\u7684 chkconfig \u6ce8\u91ca\uff0c \u6211\u4eec\u53ef\u4ee5\u6dfb\u52a0 init \u811a\u672c\uff0c\u4ee5 root \u7528\u6237\u6267\u884c\uff0c <\/p>\n
# chkconfig –add oracle. <\/p>\n
\u7528 chkconfig \u7684\u67e5\u8be2\uff0c\u6211\u4eec\u80fd\u6838\u5b9e\u6211\u4eec\u6240\u4f5c\u7684\u6dfb\u52a0: <\/p>\n
[root]# chkconfig –list | grep oracle <\/p>\n
oracle 0:off 1:off 2:on 3:on 4:on 5:on 6:off <\/p>\n
\u800c\u4e14\uff0c\u6211\u4eec\u53ef\u4ee5\u7528\u6807\u51c6\u7684 find \u547d\u4ee4\u5bdf\u770b chkconfig \u5982\u4f55\u8bbe\u5b9a\u7b26\u53f7\u8fde\u63a5\uff1a <\/p>\n
[root]# find \/etc\/rc.d -name ‘*oracle’ -print <\/p>\n
\/etc\/rc.d\/init.d\/oracle <\/p>\n
\/etc\/rc.d\/rc0.d\/K05oracle <\/p>\n
\/etc\/rc.d\/rc1.d\/K05oracle <\/p>\n
\/etc\/rc.d\/rc2.d\/S80oracle <\/p>\n
\/etc\/rc.d\/rc3.d\/S80oracle <\/p>\n
\/etc\/rc.d\/rc4.d\/S80oracle <\/p>\n
\/etc\/rc.d\/rc5.d\/S80oracle <\/p>\n
\/etc\/rc.d\/rc6.d\/K05oracle <\/p>\n
\u6b63\u5982\u9700\u8981\u7684\u90a3\u6837\uff0ckill \u8fde\u63a5\u7684\u540d\u5b57\u5305\u542b\u4f18\u5148\u6743 05 \u800c start \u8fde\u63a5\u5305\u542b 80\u3002\u5982\u679c\u4f60\u9700\u8981\u8c03\u6574\u4f18\u5148\u6743\uff0c(\u5982\uff1a\u6211\u4eec\u505c\u6b62\u7684\u4f18\u5148\u6743\u9700\u8981\u8bbe\u4e3a 03)\uff0c\u7b80\u5355\u7684\u8c03\u6574 oracle init \u811a\u672c\u7684chkconfig \u6ce8\u91ca\u884c\u5e76\u8fd0\u884c reset\u547d\u4ee4 command\uff0c\u5982\u4e0b\u6240\u793a\u3002\u7b26\u53f7\u8fde\u63a5\u4f1a\u88ab\u6539\u540d\uff1a <\/p>\n
[root]# chkconfig oracle reset <\/p>\n
[root]# find \/etc\/rc.d -name ‘*oracle’ -print <\/p>\n
\/etc\/rc.d\/init.d\/oracle <\/p>\n
\/etc\/rc.d\/rc0.d\/K03oracle <\/p>\n
\/etc\/rc.d\/rc1.d\/K03oracle <\/p>\n
\/etc\/rc.d\/rc2.d\/S80oracle <\/p>\n
\/etc\/rc.d\/rc3.d\/S80oracle <\/p>\n
\/etc\/rc.d\/rc4.d\/S80oracle <\/p>\n
\/etc\/rc.d\/rc5.d\/S80oracle <\/p>\n
\/etc\/rc.d\/rc6.d\/K03oracle<\/p>\n
xinetd\u7f16<\/strong><\/p>\n \u5927\u5bb6\u53ef\u80fd\u90fd\u77e5\u9053\u4e86\uff0cinetd\u5728 Red Hat 7\u4e2d\u5df2\u7ecf\u88abxinetd \u6240\u53d6\u4ee3(\u53c2\u8003\u672c\u7ad9 "\u4f7f\u7528xinetd" \u4e00\u6587)\u3002\u800c\u4e14\uff0cchkconfig \u7684\u529f\u80fd\u5df2\u7ecf\u88ab\u6269\u5c55\uff0c\u53ef\u4ee5\u7ba1\u7406\u4e00\u4e9b xinetd \u7684 Internet \u670d\u52a1\u3002\u4f8b\u5b50\u5982\u4e0b\uff1a <\/p>\n [root]# chkconfig –list <\/p>\n … <\/p>\n xinetd based services: <\/p>\n finger: on <\/p>\n linuxconf-web: off <\/p>\n rexec: off <\/p>\n rlogin: off <\/p>\n rsh: off <\/p>\n ntalk: off <\/p>\n talk: off <\/p>\n telnet: on <\/p>\n tftp: off <\/p>\n wu-ftpd: on <\/p>\n \u7981\u6389\u4e00\u4e2a xinetd \u670d\u52a1\uff0c\u53ef\u80fd\u662f finger\uff0c\u4f60\u5e94\u8be5\u8f93\u5165\uff1a <\/p>\n [root]# chkconfig finger off. <\/p>\n \u5f88\u7b80\u6377\u554a\uff0c\u5475\u5475\u3002\u53ef\u662f\uff0c\u8fd9\u91cc\u6709\u4e2a\u95ee\u9898\u3002\u5f53\u914d\u7f6e\u5df2\u7ecf\u6539\u53d8\uff0c\u547d\u4ee4 \/etc\/init.d\/xinetd reload \u6307\u660e xinetd \u81ea\u52a8\u91cd\u8f7d\u5165\u65b0\u7684\u914d\u7f6e\uff0c\u88ab chkconfig \u6267\u884c\u3002\u8fd9\u4e2a\u811a\u672c\u8fd0\u884c\u4e00\u4e2a\u5e26\u6709 SIGUSR2 \u4fe1\u53f7\u7684 kill \u6307\u793a xinetd \u8fdb\u884c\u4e00\u4e2a"\u786c"\u91cd\u914d\u7f6e\u3002 <\/p>\n \u90a3\u610f\u5473\u7740\u4ec0\u4e48\uff1f\u54e6\uff0c\u5f53\u6211\u6d4b\u8bd5\u7684\u65f6\u5019\uff0c\u901a\u8fc7 xinetd \u63d0\u4f9b\u7684\u6d3b\u52a8\u670d\u52a1(\u5982 Telnet, FTP \u7b49)\u7acb\u523b\u88ab\u4e2d\u6b62\u3002\u5982\u679c\u4f60\u80fd\u8ba1\u5212\u5728\u6700\u5408\u9002\u7684\u65f6\u95f4\u542f\u52a8\/\u7981\u6b62\u4f60\u7684\u7cfb\u7edf\u4e0a\u7684\u670d\u52a1\uff0c\u53ef\u80fd\u4e0d\u662f\u4e2a\u95ee\u9898\u3002\u4f5c\u4e3a\u4e00\u79cd\u66ff\u4ee3\u65b9\u5f0f\uff0c\u4f60\u53ef\u4ee5\u8c03\u6574\u4f60\u7684 \/etc\/init.d\/xinetd \u811a\u672c \uff0c\u8fd9\u6837 reload \u9009\u9879\u53d1\u9001\u4e00\u4e2a SIGUSR1 \u4fe1\u53f7\u3002 \u8fd9\u662f\u4e2a"\u8f6f"\u91cd\u914d\u7f6e\u3002\u8fd9\u5c06\u91cd\u542f\u52a8\u4f60\u7684\u670d\u52a1\u800c\u4e0d\u4e2d\u65ad\u4f60\u73b0\u5b58\u7684\u8fde\u63a5 \u3002 <\/p>\n chkconfig \u7ba1\u7406\u4e0b\uff0c\u6dfb\u52a0xinetd\u670d\u52a1\u53ea\u8981\u7b80\u5355\u7684\u6dfb\u52a0xinetd\u670d\u52a1\u6587\u4ef6\u5230 \/etc\/xinetd.d\u76ee\u5f55\u4e2d\u3002chkconfig\u4f1a\u81ea\u52a8\u7684"\u6361\u8d77"\u5b83\u5e76\u4f7f\u5176\u53ef\u7528\uff0c\u901a\u8fc7chkconfig \u5de5\u5177\u8fdb\u884c\u7ba1\u7406\u3002\u7b80\u6d01\u963f\uff01 <\/p>\n \u73b0\u5728\u4f60\u5df2\u7ecf\u5e94\u8be5\u8ba4\u8bc6\u5230\u7ea2\u5e3d\u5b50\u7684 chkconfig \u5de5\u5177\u7ba1\u7406 init \u811a\u672c\u7684\u597d\u5904\u4e86\uff0c\u867d\u7136\u5b83\u7684\u529f\u80fd\u4f3c\u4e4e\u7b80\u5355\u4e86\u4e9b\uff0c\u4f46\u662f\u5b83\u8282\u7701\u65f6\u95f4\uff0c\u8fd9\u4f7f\u5176\u6210\u4e3a\u4e00\u4e2a\u7cfb\u7edf\u7ba1\u7406\u5458\u9002\u7528\u7684\u547d\u4ee4\uff0c\u503c\u5f97\u8bb0\u7262\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u6ce8\u518c\u5e76\u7ba1\u7406Linux\u7cfb\u7edf\u521d\u59cb\u5316\u7684\u65f6\u5019\u542f\u52a8\u7684\u670d\u52a1,chkconfig\u786e\u5b9e\u662f\u4e00\u4e2a\u6bd4\u8f83\u65b9\u4fbf\u7684\u5de5\u5177.<\/p>\n \u5148\u4e86\u89e3\u4e00\u4e0b\u57fa\u672c\u77e5\u8bc6\u5427 id \u4ee3\u8868\u7528\u6237\u5b9a\u4e49\u7684\u552f\u4e00\u7684\u6807\u5fd7 <\/p>\n runlevel \u53ef\u4ee5\u4f7f0-6\u7684\u7ec4\u5408 \u6216\u8005\u4e3a\u7a7a <\/p>\n action \u6765\u81ea\u4e00\u4e2a\u5173\u952e\u8bcdkeyword \u63cf\u8ff0init\u5982\u4f55\u5bf9\u5f85process <\/p>\n process \u662f\u8981\u6267\u884c\u7684\u547d\u4ee4 <\/p>\n \u63cf\u8ff0 action \u5b57\u6bb5\u7684\u5404\u79cd\u5173\u952e\u5b57\u53ef\u4ee5\u5728 inittab \u7684\u624b\u518c\u4e2d\u627e\u5230\u3002\u5e38\u7528\u7684\u5173\u952e\u5b57\uff0c\u4e0d\u662f\u5168\u90e8\uff0cUNIX \u5e73\u53f0\u5305\u62ec\u8fd9\u4e9b: <\/p>\n initdefault \u5b9a\u4e49\u4e00\u4e2a\u7cfb\u7edf\u542f\u52a8\u540e\u8fdb\u5165\u7684\u8fd0\u884c\u7ea7 <\/p>\n wait \u4f1a\u88ab<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts\/1062"}],"collection":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/comments?post=1062"}],"version-history":[{"count":0,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts\/1062\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/media?parent=1062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/categories?post=1062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/tags?post=1062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
id:runlevel:action:process <\/p>\n