CentOS8:服务管理

开机启动项管理

1、开启服务开机自启动:

---- systemctl enable 服务名称

---- systemctl enable mysqld

2、关闭服务开机自启动:

---- systemctl disable 服务名称

---- systemctl disable mysqld

服务管理

1、服务开启:

---- systemctl start 服务名称

---- systemctl start mysqld

2、服务关闭:

---- systemctl stop 服务名称

---- systemctl stop mysqld

3、服务重启:

---- systemctl restart 服务名称

---- systemctl restart mysqld

4、查看服务:

---- systemctl status 服务名称

---- systemctl status mysqld