目录

Network Manager

注意:network services和NetworkManager会有冲突,建议永久关闭network services

开启Network Manager

在网卡配置文件中加入:NM_CONTROLLRD=yes 开启Network Manager

NM_CONTROLLED是Network Manger的参数,实时生效,编辑网卡配置后会立即生效。

nmcli指令依赖NetworkManagwr服务。

RHEL7的服务管理systemctl指令

RHEL7中引入了systemctl作为系统服务的管理指令,下面介绍systemctl的用法。

服务的启动、停止、重载、重启

systemctl start|stop|reload|restart serviceName

系统服务启动脚本文件路径:/usr/lib/systemd/system

服务的分类

service服务

systemctl list-units --type service #列出所有services

target开机级别:target是多个services或target的集合

systemctl list-units --type target #列出所有的target
systemctl get-default #显示默认开机级别
systemctl set-default TAB #设定下次开机的启动级别

指令选项

systemctl enable serviceName   #开机服务自启动
systemctl disable serviceName #下次开机不自启动服务
systemctl is-enable serviceName #显示服务下次开机是否启动
systemctl is-active serviceName #显示服务是否在运行
systemctl list-units #列出当前所有服务的状态
systemctl list-unit-files #列出所有类型下次开机的状态
systemctl list-dependencies sshd.service #列出服务启动所依赖的服务
systemctl mask/unmask serviceName #锁定/解锁服务
systemctl list-units --type serviceName #列出某种类型的状态

还有下列选项:建议使用帮助手册查看使用说明

exited 运行完

waiting 等待其他服务

running 正在运行

inactive 服务Stop

static 其他服务依赖的服务,不需要设定自启动,会有需要的时候被自动激活

Jmilk

Linux_ServicesManagement_RHEL7的更多相关文章

随机推荐

  1. Apple历史应用以及开发工具版本(Xcode官方历史版本等等)

    1.Xcode 官方历史版本下载:(需要登录开发者账号) https://developer.apple.com/download/more/

  2. MEWKit:Cryptotheft 的最新武器

    By:Yonathan Klijinsma 译者:知道创宇安全服务团队.404区块链安全团队 介绍 当谈到加密货币时,会联想到加密货币巨大的价格波动,交易违约.赎金勒索的情况以及许多不同种类的货币.虚 ...

  3. TFS 由于服务器时钟设置可能不正确,无法更新数据。请与 Team Foundation Server 管理员联系。

    原因:这个问题是由于修改安装TFS服务器的系统时间而导致的,因为TFS的Source Control会根据签入时间做判断,如果后续签入的时间小于变更集的最新版本的时间,就会报这个错误 解决办法:首先将 ...

  4. inittab - 与 sysv 兼容的 init 进程使用的初始化文件格式

    描述 inittab 文件描述在系统引导及通常的操作期间, 都启动哪些进程 (比如 /etc/init.d/boot, /etc/init.d/rc, getty 等等). Init(8) 讨论有关 ...

  5. PAT Advanced 1033 To Fill or Not to Fill (25 分)

    With highways available, driving a car from Hangzhou to any other city is easy. But since the tank c ...

  6. jquery preventDefault() 方法防止打开不是本站的链接URL

    将以下代码保存为test.html,用浏览器打开即可测试 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN&q ...

  7. [易学易懂系列|rustlang语言|零基础|快速入门|(10)|Vectors容器]

    [易学易懂系列|rustlang语言|零基础|快速入门|(10)] 有意思的基础知识 Vectors 我们之前知道array数组是定长,只可我保存相同类型的数据的数据类型. 如果,我们想用不定长的数组 ...

  8. Web Service Demo

    有了Web Service的一些基础,具体如何实现,通过亲自写一个Demo来理解一下. 1.创建一个空的Web项目 2.在Web项目下ADD一个Web Service 3.在Web service中写 ...

  9. 【HDU4003】Find Metal Mineral

    题目大意:给定一棵 N 个节点的有根树,边有边权,在根结点处有 K 个人,这些人会遍历树上的所有边,求如何遍历才能使得所有人走过路径的边权和最小. 题解: 引理:对于一棵子树来说,若存在 M>0 ...

  10. 【leetcode】1217. Play with Chips

    题目如下: There are some chips, and the i-th chip is at position chips[i]. You can perform any of the tw ...