| 您的当前位置:首页 --> CentOS入门 |
| CentOS 7 systemd 指令 |
| 浏览次数:2827 关键词 ( 指令 CentOS systemd ) |
|
CentOS 7
在目前的 CentOS 7(或 RHEL 7)系统中,依然可以使用 [root@localhost ~]# service network restart Restarting network (via systemctl): [ OK ] [root@localhost ~]# service httpd restart Redirecting to /bin/systemctl restart httpd.service [root@localhost ~]# service sshd restart Redirecting to /bin/systemctl restart sshd.service
但是系统会自动重定向该指令到新的指令
是时候切换到新的指令格式了,直接使用 启动服务: systemctl start httpd 停止服务: systemctl stop httpd 重启服务(先停止,后启动): systemctl restart httpd 重新加载(使用新的配置文件): systemctl reload httpd 显示服务状态: systemctl status httpd
与此同时,之前用于设定系统启动时自动运行某服务的指令 chkconfig service on 改成了, systemctl enable httpd chkconfig service off 改成了, systemctl disable httpd 检查服务状态的 chkconfig service 改成了, systemctl is-enabled httpd 列举出所有服务的指令, chkconfig –list 改成了, systemctl list-unit-files --type=service 以前能指定服务 runlevel 的 –levels 也没有了。慢慢适应吧。 |
| 下载次数:16 |
| 下载地址:点击下载 |
| 本资源为程序自动采集,如有侵权请联系我们移除 admin#80vps.com 来信请将#替换为@ |
| 下一条 centos系统中网络配置相关 上一条 CentOS 7 firewalld使用简介 |