RHEL 6 和 RHEL 7 的一些有关运行级别,服务管理,服务启动等方面的区别介绍
systemd是7中的新命令组,集成了service和chkconfig的功能。system命令可参考:https://www.cnblogs.com/ray-bk/p/10415173.html
运行级别概念的区分
System V init 运行级别 systemd 目标名称 作用
0 runlevel0.target, poweroff.target 关机
1 runlevel1.target, rescue.target 单用户模式
2 runlevel2.target, multi-user.target 等同于级别 3
3 runlevel3.target, multi-user.target 多用户的文本界面
4 runlevel4.target, multi-user.target 等同于级别 3
5 runlevel5.target, graphical.target 多用户的图形界面
6 runlevel6.target, reboot.target 重启
其中,systemd运行级别默认配置位于/etc/systemd/system/default.target,red hat 6运行级别默认配置位于/etc/inittab文件中。
systemctl 管理服务的启动、重启、停止、重载、查看状态等常用命令区分
System V init 命令(RHEL 6) systemctl 命令(RHEL 7) 作用
--------------------- --------------------- --------------------- --------------------- --------------------- --------------------- ---------------------
service foo start systemctl start foo.service 启动服务
service foo restart systemctl restart foo.service 重启服务
service foo stop systemctl stop foo.service 停止服务
service foo reload systemctl reload foo.service 重新加载配置文件(不终止服务)
service foo status systemctl status foo.service 查看服务状态
systemctl 设置服务开机启动、不启动、查看各级别下服务启动状态等常用命令
System V init 命令(RHEL 6) systemctl 命令(RHEL 7) 作用
--------------------- --------------------- --------------------- --------------------- --------------------- --------------------- ---------------------
chkconfig foo on systemctl enable foo.service 开机自动启动
chkconfig foo off systemctl disable foo.service 开机不自动启动
chkconfig foo systemctl is-enabled foo.service 查看特定服务是否为开机自动启动
chkconfig --list systemctl list-unit-files --type=service 查看各个级别下服务的启动与禁用情况
---------------------
单用户与多用户以及selinux开启关闭文件
rhel6 rhel7 说明
--------------------- --------------------- --------------------- --------------------- --------------------- --------------------- --------------------- ---------------------
cat /etc/inittab systemctl get-default 1为单3或5为多用户
--------------------- --------------------- --------------------- --------------------- --------------------- --------------------- --------------------- ---------------------
vim /etc/inittab systemctl set-default rescue.target(id:1) 切换多用户与单用户
systemctl set-default multi-user.target (id:3) 切换多用户与单用户
systemctl set-default graphical.target(id:5) 切换多用户与单用户
--------------------- --------------------- --------------------- --------------------- --------------------- --------------------- --------------------- ---------------------
/etc/selinux/config /etc/sysconfig/selinux 开启关闭selinux文件
---------------------
更多关于6,7的变化,可参考:https://www.jb51.net/article/100438.htm 或者 https://www.cnblogs.com/wjb10000/p/5566804.html
https://blog.csdn.net/wo18237095579/article/details/80292673
RHEL 6 和 RHEL 7 的一些有关运行级别,服务管理,服务启动等方面的区别介绍的更多相关文章
- CentOS 7 (RHEL 7)服务管理命令的变化
CentOS 7 (RHEL 7)带来了新的服务管理命令,为了保持兼容原有的命令仍可以使用,以下是新旧命令的对照. 启动.停止.重启.重载.检查服务:6: service httpd start|st ...
- [中英对照]Booting Process in Linux RHEL 7 | Linux RHEL 7启动过程
Booting Process in Linux RHEL 7 | Linux RHEL 7启动过程 In this post, I will guide you booting process in ...
- rhel 7 设置默认运行级别为图形
查看默认级别 # systemctl get-default multi-user.target # cat /etc/inittab # inittab is no longer used when ...
- RHEL 6和RHEL 7(CentOS 6和CentOS 7)恢复ROOT密码
RedHat 6恢复Root密码: 1.启动RedHat 6的时候在这个界面按任意键 2.出现如下界面,按 e 3.出现如下界面,选择第二个--kernel,然后再按 e 4.出现如下界面,输入 空格 ...
- CentOS 7下关于systemd的一些唠叨话一:systemd的特点和使用
摘要 近年来,Linux 系统的 init 进程经历了两次重大的演进,传统的 sysvinit 已经逐渐淡出历史舞台,新的 UpStart 和 systemd 各有特点,越来越多的 Linux 发行版 ...
- Linux upstart启动方式详解
Ubuntu从6.10开始逐步用Upstart()代替原来的SysVinit进行服务进程的管理.RHEL(CentOS)也都从版本6开始转用Upstart代替以往的init.d/rcX.d的线性启动 ...
- 浅析 Linux 初始化 init 系统,第 1 部分: sysvinit 第 2 部分: UpStart 第 3 部分: Systemd
浅析 Linux 初始化 init 系统,第 1 部分: sysvinit 第 2 部分: UpStart 第 3 部分: Systemd http://www.ibm.com/developerw ...
- Linux中的两种守护进程stand alone和xinetd
Linux中的两种守护进程stand alone和xinetd --http://www.cnblogs.com/itech/archive/2010/12/27/1914846.html#top 一 ...
- python之supervisord启动脚本
Supervisord是用Python实现的一款非常实用的进程管理工具,在批量服务化管理时特别有效.可以将非Daemon的应用转为daemon程序.关于supervisord的安装和配置,在网上已经有 ...
随机推荐
- HTML基础教程
<!DOCTYPE html><html> <head> <title></title> </head> <body> ...
- Axis2开发WebService客户端 的3种方式
Axis2开发WebService客户端 的3种方式 在dos命令下 wsdl2java -uri wsdl的地址(网络上或者本地) -p com.whir.ezoffi ...
- vue用mand-mobile ui做交易所移动版实战示例
vue用mand-mobile ui做交易所移动版实战示例 先展示几个界面: 目录结构: main.js // The Vue build version to load with the `impo ...
- GoldenGate抽取Informix数据库安装及配置
GoldenGate抽取Informix数据库安装及配置 本次测试架构 l 在中间机上安装informix csdk4.10版本,并编译配置unixODBC; l 在中间机上安装ogg for I ...
- 破解网页右键被禁止js
按F12,点击console输入一下内容后按回车 javascript:alert(document.onselectstart = document.oncontextmenu= document. ...
- php window系统 xdebug+phpstorm 本地断点调试使用教程
运行环境: phpStorm 2017.2 PHP 7.1.5 Xdebug 2.6.1 php.ini添加xdebug模块 你需要仔细分析和选择要下载的对应版本,否则无法调试.由于非常容易出错,建议 ...
- 剑指offer(42)和为S的字符串
题目描述 输入一个递增排序的数组和一个数字S,在数组中查找两个数,是的他们的和正好是S,如果有多对数字的和等于S,输出两个数的乘积最小的. 输出描述: 对应每个测试案例,输出两个数,小的先输出. 题目 ...
- PTA编程总结1—打印沙漏
题目:7-1 打印沙漏 (20 分) 本题要求你写个程序把给定的符号打印成沙漏的形状.例如给定17个"*",要求按下列格式打印 ***** *** * *** ***** 所谓&q ...
- 字段值为 null 时,序列化或反序列化成其他值
using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using System; using System.Collections.G ...
- Linux学习进阶示意图
Linux 基础 Linux 基础 Linux安装专题教程 Linux中文环境 Linux—从菜鸟到高手 鸟哥的Linux私房菜 基础学习篇(第二版) Ubuntu Linux入门到精通 Linux标 ...