Think before you speak, read before you think.

linux工具之chkconfig

by

in

linux的启动级别:

#   0 - halt (Do NOT set initdefault to this) 
#   1 - Single user mode 
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking) 
#   3 - Full multiuser mode 
#   4 - unused 
#   5 - X11 
#   6 - reboot (Do NOT set initdefault to this)
我们平时用的服务器就是3了,桌面就用5。
chkconfig可以更改某服务的启动级别,在ubuntu默认是没有的,需要手动安装一下。
查看所有开机启动的服务
chkconfig --list
设置iptables在2345级别开机启动
chkconfig --level 2345 iptables on
增加httpd服务
chkconfig --add httpd
删除httpd服务
 chkconfig --del httpd

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *