1. 程式人生 > >CentOS新老版本服務的開停方法

CentOS新老版本服務的開停方法

老版本的:CentOS5、CentOS6

服務            service xxxx [ stop | start | status | reload | restart ]

                   /etc/init.d/xxxx [ stop | start | status | reload | restart ]

 

開機啟動或關閉     checkconfig XXX   [on|off]

 

新版本的:CentOS7

服務            systemctl [ stop | start | status | reload | restart ] xxxx.service

 

開機啟動或關閉      systemctl [enable|disable] xxxx.service