CentOS7服务管理

1. 查看服务

1.1. 查看所有运行的服务

[root@centos7 ~]# systemctl -t service

UNIT LOAD ACTIVE SUB DESCRIPTION

auditd.service loaded active running Security Auditing Service

crond.service loaded active running Command Scheduler

dbus.service loaded active running D-Bus System Message Bus

getty@tty1.service loaded active running Getty on tty1

irqbalance.service loaded active running irqbalance daemon

kmod-static-nodes.service loaded active exited Create list of required stati

network.service loaded active exited LSB: Bring up/down networking

NetworkManager-wait-online.service loaded active exited Network Manager Wait On

NetworkManager.service loaded active running Network Manager

polkit.service loaded active running Authorization Manager

postfix.service loaded active running Postfix Mail Transport Agent

rhel-dmesg.service loaded active exited Dump dmesg to /var/log/dmesg

rhel-import-state.service loaded active exited Import network configuration

rhel-readonly.service loaded active exited Configure read-only root supp

rsyslog.service loaded active running System Logging Service

sshd.service loaded active running OpenSSH server daemon

tuned.service loaded active running Dynamic System Tuning Daemon

vmtoolsd.service loaded active running Service for virtual machines

LOAD = Reflects whether the unit definition was properly loaded.

ACTIVE = The high-level unit activation state, i.e. generalization of SUB.

SUB = The low-level unit activation state, values depend on unit type.

31 loaded units listed. Pass --all to see loaded but inactive units, too.

To show all installed unit files use 'systemctl list-unit-files'.

1.2. 查看所有服务

[root@centos7 ~]# systemctl list-unit-files -t service

UNIT FILE STATE

arp-ethers.service disabled

auditd.service enabled

autovt@.service enabled

blk-availability.service disabled

brandbot.service static

console-getty.service disabled

console-shell.service disabled

container-getty@.service static

cpupower.service disabled

crond.service enabled

dbus-org.freedesktop.timedate1.service static

dbus.service static

debug-shell.service disabled

dnsmasq.service disabled

dracut-cmdline.service static

dracut-initqueue.service static

2. 关闭并禁止自动启动服务

[root@centos7 ~]# systemctl stop postfix

[root@centos7 ~]# systemctl disable postfix

Removed symlink /etc/systemd/system/multi-user.target.wants/postfix.service.

[root@centos7 ~]#

3. 还有一部分SysV服务被chkconfig管理

[root@centos7 ~]# chkconfig --list

Note: This output shows SysV services only and does not include native

systemd services. SysV configuration data might be overridden by native

systemd configuration.

If you want to list systemd services use 'systemctl list-unit-files'.

To see services enabled on particular target use

'systemctl list-dependencies [target]'.

netconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:off

network 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@centos7 ~]# chkconfig netconsole off

CentOS7系列--1.4CentOS7服务的更多相关文章

  1. CentOS7系列--2.1CentOS7中安装配置NTP服务

    CentOS7安装配置NTP服务 NTP服务是时间同步服务 1. 安装NTPd [root@centos7 ~]# yum install -y ntp [jack@centos7 ~]$ vi /e ...

  2. cobbler部署centos6与centos7系列

    cobbler部署centos6与centos7系列 转载自:http://www.jianshu.com/p/a4bed77bf40d 版权声明:完全抄自 http://www.jianshu.co ...

  3. Linux操作系统-CentOS7启动流程和服务管理

    Linux操作系统-CentOS7启动流程和服务管理 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.systemd POST --> Boot Sequence --&g ...

  4. 玩转Windows服务系列——给Windows服务添加COM接口

    当我们运行一个Windows服务的时候,一般情况下,我们会选择以非窗口或者非控制台的方式运行,这样,它就只是一个后台程序,没有界面供我们进行交互. 那么当我们想与Windows服务进行实时交互的时候, ...

  5. 玩转Windows服务系列——创建Windows服务

    创建Windows服务的项目 新建项目->C++语言->ATL->ATL项目->服务(EXE) 这样就创建了一个Windows服务项目. 生成的解决方案包含两个项目:Servi ...

  6. 在 CentOS7 上部署 zookeeper 服务

    在 CentOS7 上部署 zookeeper 服务 1 用 SecureCRT 或 XShell 等 Linux 客户端工具连接至 CentOS7 服务器: 2 进入到 /usr/local/too ...

  7. CentOS7下安装SVN服务端

    CentOS7下安装SVN服务 1. yum命令即可方便的完成安装# sudo yum install subversion 测试安装是否成功:# svnserve --version 更改svn的默 ...

  8. 玩转Windows服务系列——创建Windows服务

    原文:玩转Windows服务系列——创建Windows服务 创建Windows服务的项目 新建项目->C++语言->ATL->ATL项目->服务(EXE) 这样就创建了一个Wi ...

  9. centos7非centos标准服务 /etc/init.d/service_name start || stop 启动异常

    公司自己写的java程序,在centos7系统执行/etc/init.d/service_name start||stop的时候报错: grafana二次开发的程序 [root@docp1 init. ...

随机推荐

  1. 数据结构---散列表查找(哈希表)概述和简单实现(Java)

    散列表查找定义 散列技术是在记录的存储位置和它的关键字之间建立一个确定的对应关系f,是的每个关键字key对应一个存储位置f(key).查找时,根据这个确定的对应关系找到给定值的key的对应f(key) ...

  2. WebAPI Post接收数据

    近日在写某开源商城的webapi接口,由于刚接触所以碰到某些问题,如post数据的接收啊等.在网上查询资料时给出了三种方式. 1.给多个数据对象封装成一个对象进行接收([frombody]标签只能用于 ...

  3. APP版本升级,测试用例总结

    APP升级主要在线升级.离线升级.当有新版本时,提示更新,用户点击更新,下载最新版本,进行安装升级,这种就是在线升级:已有升级包,安装升级包进行升级,这种就是离线升级. 在线升级.离线升级常见测试用例 ...

  4. .Net Core 发布WindowsServices

    项目代码文件夹 执行命令 dotnet publish -c Release -r win-x64

  5. centos7.2 get pid by process name with python3.6

    centos7.2 get pid by process name with python3.6 #-*- encoding:UTF-8 -*- import os import sys import ...

  6. (转)python函数: 内置函数

    原文:https://blog.csdn.net/pipisorry/article/details/44755423 https://juejin.im/post/5ae3ee096fb9a07aa ...

  7. TP中使用laravel那一套验证

    ---恢复内容开始--- 1,tp5项目下新建一个extends目录,同时在入口文件index.php配置 define('EXTEND_PATH', '../extend/'); 结果: 2,加载l ...

  8. vmware 实现linux目录映射window本地目录

    ---恢复内容开始--- 背景: 1,使用lnmp环境 2,代码可以在windows上面写,直接映射到linux的lnmp环境下面 第一步: vmware 新建一个linux虚拟机 一路下一步到完成 ...

  9. 针对石家庄铁道大学官网首页的UI分析

    身为一名光荣的铁大铮铮学子,我对铁大的网站首页非常的情有独钟,下面我就石家庄铁道大学的官网首页进行UI分析: 1.在首页最醒目的地方赫然写着石家庄铁道大学七个大字,让人一眼就豁然开朗. 2.网站有EN ...

  10. 分区助手官网使用教程(专业版、绿色版和WinPE版)(图文详解)

    不多说,直接上干货! 详情见 http://www.disktool.cn/jiaocheng/index.html http://www.disktool.cn/jiaocheng/index2.h ...