对比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 固有的缺点,提高系统的启动速度.关于 ...
随机推荐
- [译]如何在GitHub仓库创建一个标签tag, 并推送到远程分支?
问: 我在GitHub上有一个仓库,我需要给他打个tag.我在shell打了tag,但是在Github上没有显示出来.我还要做其他什么么? 我在shell中使用的命令是: git tag 2.0 当我 ...
- Anti Pattern - ThreadLocal variables with Thread Pool(转)
In a previous post, I wrote the usage and benefits of ThreadLocal based instance variables in concur ...
- [转]Microsoft VS Code 改变默认文字编码
概要:文件->首选项->设置 输入: "files.autoGuessEncoding": true, 然后勾上. 链接地址:https://jingyan.baidu ...
- 导入数据到数据库表,报错[Err] [Row1] [Imp] 1153 - Got a packet bigger than 'max_allowed_packet' bytes
# 在数据库新增查询,执行如下命令即可: show VARIABLES like '%max_allowed_packet%'; set global max_allowed_packet = 2*1 ...
- 最简单的策略模式代替if-else实战
一.需求 根据用户vip等级来返回不同的价格,vip等级是不固定的,随时可能要增加,价格也不是固定的. 二.常规的写法 /** * 如果有新增类型,就需要频繁的修改此处的代码! * 不符合开闭原则! ...
- git的使用学习(三)时光机穿梭
1.版本回退 现在,你已经学会了修改文件,然后把修改提交到Git版本库,现在,再练习一次,修改readme.txt文件如下: Git is a distributed version control ...
- RabbitMQ官方教程一Hello World(GOLANG语言实现)
介绍 RabbitMQ是消息中间件:它接受并转发消息. 您可以将其视为邮局系统:将要发送的邮件放在邮箱中时, 可以确保邮递员最终将邮件传递给收件人. 以此类推,RabbitMQ是一个邮箱,一个邮局和一 ...
- 【GStreamer开发】GStreamer基础教程13——播放速度
目标 快进,倒放和慢放是trick模式的共同技巧,它们有一个共同点就是它们都修改了播放的速度.本教程会展示如何来获得这些效果和如何进行逐帧的跳跃.主要内容是: 如何来变换播放的速度,变快或者变慢,前进 ...
- IDEA 创建JAVA Maven Web 工程
转载自https://www.cnblogs.com/1314wamm/p/7475771.html 步骤一:首先先创建一个project,上次我说过了创建一个project就是一个工作空间,在这里就 ...
- lnmp 是不是该吐吐槽
lnmp 提供提供了便捷 , 并且手也伸的挺长的,它已不仅仅是个服务器环境那么简单 作为服务器继承环境来讲,可能每个人的认知程度不一,总之用了它需要服从它的规则 但从个人感觉上,其埋的坑还是让人不适, ...