zoukankan      html  css  js  c++  java
  • CentOS7系列--1.4CentOS7服务

    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

  • 相关阅读:
    ASP.NET MVC案例教程(基于ASP.NET MVC beta)——第二篇:第一个页面
    HTML5网页录音和压缩,边猜边做..(附源码)
    策划编写一个新的Helper类
    正由另一进程使用,因此该进程无法访问此文件。
    第三方组件引用另一个第三方组件的悲剧
    数据库连接池的计数器设计
    让Ajax更简单
    更新Literacy
    多说
    利用C#自带组件强壮程序日志
  • 原文地址:https://www.cnblogs.com/gispathfinder/p/8833064.html
Copyright © 2011-2022 走看看