对比centos7的systemctl和其他service+chkconfig
2024-08-26 19:42:38
syetemctl就是service和chkconfig这两个命令的整合,在CentOS 7就开始被使用了。
systemctl 是系统服务管理器命令,它实际上将 service 和 chkconfig 这两个命令组合到一起。
(一)对比
任务 | 旧指令(centos6、5) | 新指令(centos7) |
显示所有已启动的服务 | chkconfig --list | systemctl list-units --type=service --all查看所有服务: systemctl list-units --type=service --all |
使某服务自动启动 | chkconfig --level 3 httpd on | systemctl enable httpd.service |
使某服务不自动启动 | chkconfig --level 3 httpd off | systemctl disable httpd.service |
检查服务状态 | service httpd status | systemctl status httpd.service (服务详细信息) systemctl is-active httpd.service (仅显示是否 Active) |
启动某服务 | service httpd start | systemctl start httpd.service |
停止某服务 | service httpd stop | systemctl stop httpd.service |
重启某服务 | service httpd restart | systemctl restart httpd.service |
(二)扩展
centos7中
yum install -y A #安装
systemctl status A # 管理
systemctl start A
systemctl stop A
systemctl restart A
systemctl enable A
systemctl disable A
systemctl list-units --type=service # 查看所有开机自动启动的服务
最新文章
- 微信网页版APP - 网页微信客户端电脑版体验
- matlab图
- require.js笔记
- WindowManagerPolicy的后缀 解释
- Socket编程基本流程实践
- 安卓 Pickers(选择器)
- pg_dump实例详解(备份postgresql和greenplum数据库)
- oracle开启一个用户
- wireshark使用方法
- dos choice 命令
- 【转】CGI
- Leetcode 88. Merge Sorted Array(easy)
- C#-----线程安全的ConcurrentQueue<;T>;队列
- UGUI血条
- JDK11&;12 新特性学习
- 【Python】【内置函数】
- php -- 魔术方法、魔术常量 简单介绍
- spark 练习
- Android cannot be cast to android.app.Fragment
- Java中过滤器和拦截器的区别
热门文章
- Egret中的对象池Pool
- 最新CSS兼容方案
- [OpenCV开发]OpenCV图像编码和解码 imencode和imdecode使用,用于网络传输图片
- 【GStreamer开发】GStreamer基础教程09——收集媒体信息
- linux抓取top命令中数据的方法
- 稀疏数组(java实现)
- ORA-01618 ORA-19809: limit exceeded for recovery files
- 11 模块、模块的搜索顺序、__file__内置属性、__name__属性
- Spring Cloud Alibaba学习笔记(4) - Feign配置与使用
- java 任务定时调度(定时器)