Centos7.x 新系统维护使用的命令

systemctl 命令是系统服务管理器指令,将 service 和 chkconfig 两个命令组合到一起。systemctl 命令常用的功能如下:

一、启动、重启、停止、重载服务以及检查服务状态
以 firewalld 为例:

1、启动 firewalld 服务
[root@localhost ~]# systemctl start firewalld.service

2、停止 firewalld 服务
[root@localhost ~]# systemctl stop firewalld.service

3、重新启动 firewalld 服务
[root@localhost ~]# systemctl restart firewalld.service

4、重载 firewalld 服务
[root@localhost ~]# systemctl reload firewalld.service

5、查看 firewalld 服务状态
[root@localhost ~]# systemctl status firewalld.service

二、开机时启用或禁用服务
1、开机时禁用 firewalld 服务
[root@localhost ~]# systemctl disable firewalld.service

2、开机时启用 firewalld 服务
[root@localhost ~]# systemctl enable firewalld.service

3、查看 firewalld 服务是否设置为开机启动
[root@localhost ~]# systemctl is-enabled firewalld.service

4、查看所有已经启动的服务
[root@localhost ~]# systemctl list-units --type=service

随机文章:

1、一个针对IE7的CSS Hack
https://www.onexin.net/one-for-the-ie7-css-hack/

2、CentOS 5.6 发行注记
https://www.onexin.net/centos-5-6-release-notes/

3、CSS+DIV:让文本字符环绕在你的图片周围
https://www.onexin.net/css-div-make-text-characters-around-the-picture-around-in-your/

4、Magento 1.5.0.1中文語言包(繁體)修訂中
https://www.onexin.net/magento-1-5-0-1-language-pack-chinese-traditional-revision/

5、Discuz!X同步好友到漫游应用
https://www.onexin.net/discuz-x-sync-friends-to-roaming-applications/

转载请注明出处:https://www.onexin.net/centos7-0-new-system-to-maintain-the-command-you-will-use/

Leave a Reply

Your email address will not be published. Required fields are marked *