1)BIOS初始化
2)Grub引导
3)核心初始化
4)Init启动并执行具体的各级别脚本
5)启动X11
[root@szm bash]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_szm-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password --dm5 $1$.Ze.11$6IW7iPiuL6N/.UzD9IQwc/
title CentOS (2.6.32-358.0.1.el6.i686)
root (hd0,0)-----------N块硬盘,M个分区
kernel /vmlinuz-2.6.32-358.0.1.el6.i686 ro root=/dev/mapper/vg_szm-lv_root rd_LVM_LV=vg_szm/lv_root rd_LVM_LV=vg_szm/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto
initrd /initramfs-2.6.32-358.0.1.el6.i686.img
title CentOS (2.6.32-279.22.1.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-279.22.1.el6.i686 ro root=/dev/mapper/vg_szm-lv_root rd_LVM_LV=vg_szm/lv_root rd_LVM_LV=vg_szm/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto
initrd /initramfs-2.6.32-279.22.1.el6.i686.img
title CentOS (2.6.32-279.19.1.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-279.19.1.el6.i686 ro root=/dev/mapper/vg_szm-lv_root rd_LVM_LV=vg_szm/lv_root rd_LVM_LV=vg_szm/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=zh_CN.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto
initrd /initramfs-2.6.32-279.19.1.el6.i686.img
title centos (2.6.32-71.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-71.el6.i686 ro root=/dev/mapper/vg_szm-lv_root rd_LVM_LV=vg_szm/lv_root rd_LVM_LV=vg_szm/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=zh_CN.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
initrd /initramfs-2.6.32-71.el6.i686.img
一个服务一般包含如下几个部分:
/etc:配置文件
/etc/init.d/:控制脚本
/usr/sbin:后台程序
/usr/bin:实用工具
/usr/share/doc:帮助文档
/var:程序数据
守护进程根据启动管理方式的不同可以分为:stand alone和xinetd管理的Superdaemon超级守护进程。stand alone启动之后就一直运行在内存当中,如ftp,web;超级守护进程不常驻内存,仅当客户发出服务请求时才由xinetd唤醒相应的服务,在客户端结束服务之后,被唤醒服务将会自动的释放所占用的资源。 |
[root@szm Downloads]# system-config-services
----窗口管理方式
[root@szm Downloads]# service
[root@szm Downloads]# chkconfig
服务启动脚本存放位置:
[root@szm Downloads]# ls /etc/rc.d/init.d/
abrt-ccpp cpuspeed httpd lvm2-monitor ntpd rpcbind sshd
abrtd crond ip6tables mdmonitor ntpdate rpcgssd sssd
abrt-oops cups ipsec messagebus numad rpcidmapd svnserve
acpid dnsmasq iptables multipathd oddjobd rpcsvcgssd sysstat
atd dovecot irqbalance netcf-transaction pcscd rsyslog tog-pegasus
auditd ebtables iscsi netconsole portreserve sandbox tomcat6
autofs fcoe iscsid netfs postfix saslauthd udev-post
avahi-daemon firstboot kdump network psacct sblim-sfcb vncserver
blk-availability functions killall NetworkManager quota_nld single vsftpd
bluetooth gpm libvirtd nfs radvd smartd winbind
certmonger haldaemon libvirt-guests nfslock rdisc snmpd wine
cgconfig halt lldpad nscd restorecond snmptrapd wpa_supplicant
cgred htcacheclean lvm2-lvmetad nslcd rngd spamassassin ypbind
链接文件,链接到上面????
[root@szm Downloads]# ls /etc/init.d/
abrt-ccpp cpuspeed httpd lvm2-monitor ntpd rpcbind sshd
abrtd crond ip6tables mdmonitor ntpdate rpcgssd sssd
abrt-oops cups ipsec messagebus numad rpcidmapd svnserve
acpid dnsmasq iptables multipathd oddjobd rpcsvcgssd sysstat
atd dovecot irqbalance netcf-transaction pcscd rsyslog tog-pegasus
auditd ebtables iscsi netconsole portreserve sandbox tomcat6
autofs fcoe iscsid netfs postfix saslauthd udev-post
avahi-daemon firstboot kdump network psacct sblim-sfcb vncserver
blk-availability functions killall NetworkManager quota_nld single vsftpd
bluetooth gpm libvirtd nfs radvd smartd winbind
certmonger haldaemon libvirt-guests nfslock rdisc snmpd wine
cgconfig halt lldpad nscd restorecond snmptrapd wpa_supplicant
cgred htcacheclean lvm2-lvmetad nslcd rngd spamassassin ypbind
[root@szm Downloads]# /etc/init.d/autofs
Usage: /etc/init.d/autofs {start|forcestart|stop|status|restart|force-reload|forcerestart|reload|condrestart|try-restart|usage}
[root@szm Downloads]# service -h
Usage: service < option > |
--status-all | [ service_name [ command |
--full-restart ] ]
[root@szm Downloads]# chkconfig -h
chkconfig version 1.3.49.3 - Copyright (C) 1997-2000 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.
usage:
chkconfig [--list] [--type <type>] [name]
chkconfig --add <name>
chkconfig --del <name>
chkconfig --override <name>
chkconfig [--leve
l <levels>] [--type <type>]
<name> <on|off|reset|resetpriorities>
[root@szm Downloads]# chkconfig --level 35 autofs on
[root@szm Downloads]# ntsysv
[root@szm Downloads]# ntsysv --level 35