对比centos7的systemctl和其他service+chkconfig
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 # 查看所有开机自动启动的服务
对比centos7的systemctl和其他service+chkconfig的更多相关文章
- CentOS7中systemctl的使用与CentOS6中service的区别
https://blog.csdn.net/u012834750/article/details/80501440 从CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon ...
- CentOS7 tomcat systemctl脚本
1,centos7 使用 systemctl 替换了 service命令 参考:redhat文档: https://access.redhat.com/documentation/en-US/Red_ ...
- CentOS7的systemctl使用
CentOS 7开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替. 1.原来的 service 命令与 sys ...
- Centos7下的systemctl命令与service和chkconfig
博主使用的操作系统是最新的CentOS 7,所以可能和网上一些老的博文有一定出入,那是因为版本更新的原因. 这里写图片描述1 service service命令用于对系统服务进行管理,比如启动(sta ...
- CentOS7 service/chkconfig replace commands
对比表,以 apache / httpd 为例 任务 旧指令 新指令 使某服务自动启动 chkconfig --level 3 httpd on systemctl enable httpd.serv ...
- 管理系统和服务systemctl(centos6:chkconfig、service命令)
传统:SysV init 红帽6.Ubuntu6:采用Upstart 红帽7:采用全新的Systemd SysV init运行级别,主题思想是串行的启动所有将来需要用到的服务(所以计算机没有利用多CP ...
- centos7也支持service命令启动服务吗,对于centos7 中的systemctl和旧的service命令的区别和联系
一.centos7也支持service命令启动服务吗 CentOS 7.0中一个最主要的改变,就是切换到了systemd.它用于替代红帽企业版Linux前任版本中的SysV和Upstart,对系统和服 ...
- centos7 安装mariadb、"systemctl status mariadb.service" and "journalctl -xe" for details
centos7 mariadb 安装 也可解决此错误:ob for mariadb.service failed because the control process exited with err ...
- CentOS7+Nginx设置Systemctl restart nginx.service服务
centos 7上是用Systemd进行系统初始化的,Systemd 是 Linux 系统中最新的初始化系统(init),它主要的设计目标是克服 sysvinit 固有的缺点,提高系统的启动速度.关于 ...
随机推荐
- Qt5.10使用了qml后打包发布应用遇到的问题
现象: 按照https://www.cnblogs.com/judes/p/11247728.html的方法,能生成一些exe所需环境和动态库,但是打开程序,用到了qml的地方,全是黑色的. 原因: ...
- SQL语句精妙集合
1一.基础 2 31.说明:创建数据库 4Create DATABASE database-name 5 62.说明:删除数据库 7drop database dbname 8 93. ...
- Spring Cloud 如何使用Eureka注册服务 4.2.2
要使用Eureka实现服务发现,需要项目中包含Eureka的服务端发现组件以及客户端发现组件. 搭建Maven父工程 创建一个Maven父工程xcservice-springcloud,并在工程的po ...
- Spring MVC 设计概述
MVC设计的根本原因在于解耦各个模块 Spring MVC的架构 对于持久层而言,随着软件发展,迁移数据库的可能性很小,所以在大部分情况下都用不到Hibernate的HQL来满足移植数据库的要求. ...
- Flink 自定义source和sink,获取kafka的key,输出指定key
--------20190905更新------- 沙雕了,可以用 JSONKeyValueDeserializationSchema,接收ObjectNode的数据,如果有key,会放在Objec ...
- centos7上安装mysql8(下)
1.修改root密码 MySQL8和5的密码加密方式不同,mysql_native_password是5的加密方式.mysql已经将之前的mysql_native_password认证,修改成了cac ...
- Swift4.0复习协议
1.协议的定义: /// 定义一个协议MyProt protocol MyProt { /// 声明了一个实例方法foo, /// 其类型为:() -> Void func foo() ...
- 静态站点生成器-md-vue-vuepress
推荐指数:
- AWS 基础设施即代码(五)
基础设施即代码 概述 手动配置的挑战:可能因为人为错误导致缺乏可靠性,环境无法完全再现,同时需要额外文档 基础设施即代码,是软件开发中用于创建可重用.可维护.可扩展及可测试基础设施的技术.实践和工具, ...
- 【tensorflow】softmax_cross_entropy_with_logits与sparse_softmax_cross_entropy_with_logits
softmax_cross_entropy_with_logits与sparse_softmax_cross_entropy_with_logits都是对最后的预测结果进行softmax然后求交叉熵 ...