文章目录


启动服务:systemctl start xxx.service
关闭服务:systemctl stop xxx.service
重启服务:systemctl restart xxx.service
显示服务的状态:systemctl status xxx.service
在开机时启用服务:systemctl enable xxx.service
在开机时禁用服务:systemctl disable xxx.service
查看服务是否开机启动:systemctl is-enabled xxx.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled
查看启动失败的服务列表:systemctl --failed
关闭防火墙
在外部访问CentOS中部署应用时,需要关闭防火墙。

关闭防火墙命令:systemctl stop firewalld.service

开启防火墙:systemctl start firewalld.service

关闭开机自启动:systemctl disable firewalld.service

开启开机启动:systemctl enable firewalld.service

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐