大数据-linux服务管理

linux服务管理

1         后台服务管理

service network status   查看指定服务的状态

service network stop     停止指定服务

service network start    启动指定服务

service network restart  重启指定服务

service --status-all  查看系统中所有的后台服务

2         设置后台服务的自启配置

chkconfig   查看所有服务器自启配置

chkconfig iptables off   关掉指定服务的自动启动

chkconfig iptables on   开启指定服务的自动启动

==添加mysql的自动启动服务===

开机启动:

chkconfig  --add  mysqld

chkconfig  mysqld  on

3         系统启动级别管理

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)

#   3 - Full multiuser mode

#   4 - unused

#   5 - X11

#   6 - reboot (Do NOT set initdefault to this)

#

id:3:initdefault:

猜你喜欢

转载自www.cnblogs.com/qq18361642/p/11856565.html