日期:2014-05-16  浏览次数:20765 次

linux 系统的六种运行级别和服务的运行级别有什么联系,
linux 系统的六种运行级别和服务的运行级别有什么联系,又有什么区别?

------解决方案--------------------
服务的运行级别是指什么呢?

# 0 - 停机(千万不要把initdefault设置为0 ) 
    # 1 - 单用户模式 
    # 2 - 多用户,但是没有NFS 
    # 3 - 完全多用户模式 
    # 4 - 没有用到 
    # 5 - X11 
    # 6 - 重新启动(千万不要把initdefault设置为6 ) 



------解决方案--------------------
这里对应了每一个进程都做了些什么

[root@RHEL4_U5 rc.d]# ll /etc/rc.d/
total 112
drwxr-xr-x 2 root root 4096 Apr 25 16:07 init.d
-rwxr-xr-x 1 root root 2352 Mar 17 2004 rc
drwxr-xr-x 2 root root 4096 Apr 25 16:07 rc0.d
drwxr-xr-x 2 root root 4096 Apr 25 16:07 rc1.d
drwxr-xr-x 2 root root 4096 Apr 25 16:07 rc2.d
drwxr-xr-x 2 root root 4096 Apr 27 15:57 rc3.d
drwxr-xr-x 2 root root 4096 Apr 25 16:07 rc4.d
drwxr-xr-x 2 root root 4096 Apr 27 15:57 rc5.d
drwxr-xr-x 2 root root 4096 Apr 25 16:07 rc6.d
-rwxr-xr-x 1 root root 220 Jun 24 2003 rc.local
-rwxr-xr-x 1 root root 27535 Feb 13 2007 rc.sysinit

------解决方案--------------------
例如是运行级别3

[root@RHEL4_U5 rc.d]# cd rc3.d/
[root@RHEL4_U5 rc3.d]# ls
K01tog-pegasus K15httpd K44rawdevices K85opensmd K92iptables S09pcmcia S55sshd
K02cups-config-daemon K20nfs K50netdump K86nfslock K94diskdump S10network S56xinetd
K02NetworkManager K20rwhod K50tux K87auditd K95kudzu S12syslog S87iiim
K03rhnsd K24irda K50vsftpd K87ipmi K99cpuspeed S13irqbalance S90xfs
K05atd K25squid K60crond K87named K99lvm2-monitor S18rpcidmapd S95anacron
K05saslauthd K30sendmail K73ypbind K87portmap K99readahead S19rpcgssd S97messagebus
K10cups K30spamassassin K74nscd K88wpa_supplicant K99readahead_early S26apmd S98haldaemon
K10dc_server K35dovecot K74ntpd K89netplugd S00microcode_ctl S26lm_sensors S99local
K10psacct K35smb K75netfs K89rdisc S01sysstat S28autofs
K12dc_client K35vncserver K85mdmonitor K90bluetooth S05openibd S40smartd
K15gpm K35winbind K85mdmpd K91isdn S08arptables_jf S44acpid


S开头的是开机启动的进程
K开头的是关机要终止的进程