CentOS 7 新增加的systemctl 的用法和功能
来源:互联网 发布:java是后端吗 编辑:程序博客网 时间:2024/06/15 04:40
转自:http://www.linuxidc.com/Linux/2014-11/109236.htm
我们对service和chkconfig两个命令都不陌生,systemctl 是管制服务的主要工具, 它整合了chkconfig 与 service功能于一体。
service的服务文件位置:/usr/lib/systemd/system
systemctl is-enabled iptables.service
systemctl is-enabled servicename.service #查询服务是否开机启动
systemctl enable *.service #开机运行服务
systemctl disable *.service #取消开机运行
systemctl start *.service #启动服务
systemctl stop *.service #停止服务
systemctl restart *.service #重启服务
systemctl reload *.service #重新加载服务配置文件
systemctl status *.service #查询服务运行状态
systemctl –failed #显示启动失败的服务
注:*代表某个服务的名字,如http的服务名为httpd
例如在CentOS 7 上安装http
[root@CentOS7 ~]# yum -y install httpd
启动服务(等同于service httpd start)
systemctl start httpd.service
停止服务(等同于service httpd stop)
systemctl stop httpd.service
重启服务(等同于service httpd restart)
systemctl restart httpd.service
查看服务是否运行(等同于service httpd status)
systemctl status httpd.service
开机自启动服务(等同于chkconfig httpd on)
systemctl enable httpd.service
开机时禁用服务(等同于chkconfig httpd on)
systemctl disable httpd.service
查看服务是否开机启动 (等同于chkconfig –list)
- CentOS 7 新增加的systemctl 的用法和功能
- CentOS 7 上systemctl 的用法
- CentOS 7 上systemctl 的用法
- CentOS 7 上systemctl 的用法
- CentOS 7 上systemctl 的用法
- CentOS 7 上systemctl 的用法
- CentOS 7 上systemctl 的用法 【转】
- CentOS 7 上systemctl 的用法
- CentOS 7 上systemctl 命令的用法
- CentOS 7 上systemctl 的用法(6.5上的service)
- CentOS 7 上systemctl 的用法(注意不是多个容器服务开机启动)
- centos systemctl用法
- MongoDB在CentOS 7上的systemctl服务配置
- CentOS 5.2 LVM 新增加一块硬盘的方法
- RHEL 7 中 systemctl 的用法(替代service 和 chkconfig)
- RHEL 7 中 systemctl 的用法(替代service 和 chkconfig)
- Android 5.0 上新增加的功能(部分)
- Windows 10: 截图工具新增加的延迟功能
- SpringMVC与Struts2区别与比较总结
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- 设置按钮的contentMode, 让其图片居中填充显示
- Codeforces 821 A. Okabe and Future Gadget Laboratory
- EffectiveJava心得一
- CentOS 7 新增加的systemctl 的用法和功能
- 面试题13—在O(1)时间删除链表结点
- 百年双星转型路,慧聚SRM助成功
- 贪心算法之钱币找零问题
- Spark自定义RDD重分区
- 10X 程序员应该具备哪些素质
- 关于Java Web开发出现乱码的原因总结
- 九度oj-1067-n的阶乘
- Eclipse Mars2在线安装svn详细步骤