zoukankan      html  css  js  c++  java
  • “systemd”命令管理各类服务

    一、centos7、red hat7 取消了运行级别的概念,用systemd代替了init中的运行级别概念。

    二、用“ln”命令把“多用户,无图形”目标文件链接到/etc/systemd/system/目录中:
    # ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target 注:实现开机进入命令行界面。

    三、使用“systemctl”命令管理服务
    systemctl star 服务名.service 启动服务
    systemctl restart 服务名.service 重启服务
    systemctl stop 服务名.service 停止服务
    systemctl reload 服务名.service 重新加载配置文件(不终止服务)
    systemctl status 服务名.service 查看服务状态

    四、使用“systemctl”设置开机启动、不启动、查看各级别下服务启动状态
    systemctl enable 服务名.service 开机自启服务
    systemctl disable 服务名.service 开启不自启服务
    systemctl is-enabled 服务名.service 查看特定服务是否开机自启
    systemctl list-unit-files --type=service 查看各级别下服务启动与禁用情况

  • 相关阅读:
    vector数组的翻转与排序
    20210310日报
    vector数组的遍历
    vector数组的删除
    vector数组的插入
    20210304日报
    20210303日报
    20210302日报
    计算datetime.date n个月后(前)的日期
    pandas 重命名MultiIndex列
  • 原文地址:https://www.cnblogs.com/zyh121344305/p/8677015.html
Copyright © 2011-2022 走看看