linux 服务管理

来源:互联网 发布:淘宝直播一个月多少钱 编辑:程序博客网 时间:2024/05/16 17:40

后台服务管理

service iptables status 查看指定服务的状态
service iptables stop 停止指定服务
service iptables start 启动指定服务
service iptables restart 重启指定服务
service –status-all 查看系统中所有的后台服务

设置后台服务的自启配置

chkconfig 查看所有服务器自启配置
chkconfig iptables off 关掉指定服务的自动启动
chkconfig iptables on 开启指定服务的自动启动
chkconfig iptables –list 查看启动

系统启动级别管理

chkconfig可以查看各个服务在各种启动级别里面的状态
vi /etc/inittab

# Default runlevel. The runlevels used are:#   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) # 多用户级别不支持NFS#   3 - Full multiuser mode # 全功能的多用户模式#   4 - unused#   5 - X11 # 图形化界面#   6 - reboot (Do NOT set initdefault to this) # 不断的重启

id:3:initdefault:

原创粉丝点击