版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hellfu/article/details/82286844
老版本的: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