zoukankan      html  css  js  c++  java
  • CentOS7 服务检查命令

    列出所有服务

    systemctl list-unit-files

    列出运行中的服务

    systemctl list-units

    列出所有失败的服务

    systemctl --failed

    检查单个服务是否启用

    systemctl is-enabled mysqld.service

    查看单个服务的状态

    systemctl status firewalld.service

    启动、重启、停止、重载某个服务

    systemctl start httpd.service
    systemctl restart httpd.service
    systemctl stop httpd.service
    systemctl reload httpd.service
    systemctl status httpd.service

    激活/禁止自动重启

    systemctl enable httpd.service
    systemctl disable httpd.service

    使用Systemctl控制并管理挂载点

    systemctl list-unit-files --type=socket
    systemctl start cups.socket
    systemctl restart cups.socket
    systemctl stop cups.socket
    systemctl reload cups.socket
    systemctl status cups.socket
    systemctl is-active cups.socket
    systemctl enable cups.socket
    systemctl disable cups.socket
    systemctl mask cups.socket

    使用Systemctl管理服务的CPU利用率

    systemctl show -p CPUShares httpd.service
    systemctl set-property httpd.service CPUShares=2000
    systemctl show -p CPUShares httpd.service
    systemctl show httpd

    启动防火墙

    systemctl start firewalld.service

    停止防火墙

    systemctl stop firewalld.service

    查看firewalld防火墙状态

    firewall-cmd --state

    禁止防火墙开机启动

    systemctl disable firewalld.service

    列出正在运行的服务状态

    systemctl

    启动一个服务

    systemctl start postfix.service

    关闭一个服务

    systemctl stop postfix.service

    重启一个服务

    systemctl restart postfix.service

    显示一个服务的状态

    systemctl status postfix.service

    在开机时启用一个服务

    systemctl enable postfix.service

    在开机时禁用一个服务

    systemctl disable postfix.service

    查看服务是否开机启动

    systemctl is-enabled postfix.service

    查看已启动的服务列表

    systemctl list-unit-files|grep enabled
  • 相关阅读:
    webpack中设置jquery为全局对象
    JS判断不同web访问环境,主要针对移动设备,
    js比较两个日期天数差
    原生js跨域
    我们项目中用到的jsonp跨域
    Js跨域解决方法总结
    js call的使用,js call 方法实现继承
    windows下配置bower路径
    兼容弹层代码
    自定义下拉列表框(2015.1.30)
  • 原文地址:https://www.cnblogs.com/ZeroSunny/p/12667080.html
Copyright © 2011-2022 走看看