From 2bd2618291a4f04de5437dc872e6ae38c3b126dc Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 23 Jun 2024 23:50:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20240622\347\254\224\350\256\260.md" | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 "\351\242\234\351\224\220\346\225\217/20240622\347\254\224\350\256\260.md" diff --git "a/\351\242\234\351\224\220\346\225\217/20240622\347\254\224\350\256\260.md" "b/\351\242\234\351\224\220\346\225\217/20240622\347\254\224\350\256\260.md" new file mode 100644 index 0000000..4ebcf9f --- /dev/null +++ "b/\351\242\234\351\224\220\346\225\217/20240622\347\254\224\350\256\260.md" @@ -0,0 +1,33 @@ +## 服务管理 + +## 相关命令 +启动:start + +停止 stop + +重启 restart + +重加载配置 reload + +开机自启用 enable + +查看状态status + +1. systemctl (systemctl start nginx +2. service(service nginx start +3. /etc/init.d/(/etc/init.d/nginx start + + +## systemctl和service的区别 + + system V 类型指的是使用/etc/init.d脚本和service命令管理服务的旧的Linux服务 + +systemd 类型指的是新的Linux服务管理方式,使用systemctl来管理 + + + +## service --status -all 列出所有正在运行的服务 + +​ 【+】代表服务在启动运行的状态 + +​ 【-】代表服务实在关闭停止的状态 \ No newline at end of file -- Gitee