一、CentOS7 systemctl

在CentOS7中,进行chkconfig命令操作时会发现有类似“systemctl.....”的提示,systemctl可以简单实现service和chkconfig的结合,这样通过一个命令就可以实现两个命令的功能。

systemctl命令的基本操作格式是:

systemctl [OPTIONS...]  {COMMAND}...

以nginx服务为例,实现停止、启动、重启的动作如下:

systemctl stop    nginx.service
systemctl start   nginx.service
systemctl restart nginx.service

检查服务状态

systemctl status nginx.service

使服务开机启动

systemctl enable nginx.service

取消服务开机启动

systemctl disable nginx.service

二、CentOS 7 firewalld

 

相关文章:

  • 2021-10-16
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2021-07-10
  • 2021-06-22
  • 2021-05-23
猜你喜欢
  • 2021-11-14
  • 2022-01-30
  • 2021-11-02
相关资源
相似解决方案