首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

systemctl(1) command

# 列出正在运行的 unit systemctl # 或 systemctl list-units # 列出所有 unit,包括没有运行的 unit systemctl list-units --all...# 列出所有没有运行的 unit systemctl list-units --all --state=inactive # 列出所有加载失败的 unit systemctl list-units...Description:简短描述 Documentation:文档地址 Requires:当前 Unit 依赖的其他 Unit,如果它们没有运行,当前 Unit 会启动失败 Wants:与当前 Unit...配合的其他 Unit,如果它们没有运行,当前 Unit 不会启动失败 BindsTo:与Requires类似,它指定的 Unit 如果退出,会导致当前 Unit 停止运行 Before:如果该字段指定的...enabled:已建立启动链接 disabled:没建立启动链接 static:该配置文件没有[Install]部分(无法执行),只能作为其他配置文件的依赖 masked:该配置文件被禁止建立启动链接

29320

Linux 命令(107)—— systemctl 命令

# 列出正在运行的 unit systemctl # 或 systemctl list-units # 列出所有 unit,包括没有运行的 unit systemctl list-units --all...# 列出所有没有运行的 unit systemctl list-units --all --state=inactive # 列出所有加载失败的 unit systemctl list-units...Description:简短描述 Documentation:文档地址 Requires:当前 Unit 依赖的其他 Unit,如果它们没有运行,当前 Unit 会启动失败 Wants:与当前 Unit...配合的其他 Unit,如果它们没有运行,当前 Unit 不会启动失败 BindsTo:与Requires类似,它指定的 Unit 如果退出,会导致当前 Unit 停止运行 Before:如果该字段指定的...enabled:已建立启动链接 disabled:没建立启动链接 static:该配置文件没有[Install]部分(无法执行),只能作为其他配置文件的依赖 masked:该配置文件被禁止建立启动链接

2.2K20

通过systemctl管理mysqld服务

2.systemctl管理服务的好处 平行处理所有服务,加速开机流程 旧的init 启动脚本是【一项一项任务依序启动】的模式,因此不相依的服务也是一个一个的等待。...一经要求就相应的 on-demand 启动方式 System 全部就是仅有一直systemd 服务 搭配systemctl 指令来处理,无需其它的指令来支持。...服务相依性的自我检查 由于systemd可以自定义服务相依性的检查,因此如果 B 服务是架构在 A服务上面的,那当你在没有启动 A 服务的情况下仅手动启动 B 服务时,systemd 会自动帮你启动A...enable mysql3307.service  ---设置开启自启动 systemctl start mysql3307.service     ----开启此服务 systemctl stop...mysql3307.service    -----关闭此服务 systemctl status mysql3307.service -----查看服务状态 注意 ; (1)/data/mysql57/

2.5K20

自定义 systemctl 管理服务

control-group(默认值):当前控制组里面的所有子进程,都会被杀掉 > process:只杀主进程 > mixed:主进程将收到 SIGTERM 信号,子进程收到 SIGKILL 信号 > none:没有进程会被杀掉...,才会重启 >> on-failure:非正常退出时(退出状态码非0),包括被信号终止和超时,才会重启 >> on-abnormal:只有被信号终止和超时,才会重启 >> on-abort:只有在收到没有捕捉到的信号终止时...这就是为什么systemctl enable命令能设置开机启动的原因。...使用 Target 的时候,systemctl list-dependencies命令和systemctl isolate命令也很有用。...daemon-reload systemctl enable node-exporter.service systemctl start node-exporter.service 查看日志 [root

1.5K30
领券