From c23bc2a3f18068c25d4c291e85f80ae42b631b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4?= <1430357783@qq.com> Date: Mon, 24 Jun 2024 12:47:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...15\345\212\241\347\256\241\347\220\206.md" | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 "\345\220\264\345\221\250\345\205\250/20240622-\346\234\215\345\212\241\347\256\241\347\220\206.md" diff --git "a/\345\220\264\345\221\250\345\205\250/20240622-\346\234\215\345\212\241\347\256\241\347\220\206.md" "b/\345\220\264\345\221\250\345\205\250/20240622-\346\234\215\345\212\241\347\256\241\347\220\206.md" new file mode 100644 index 0000000..21f79dc --- /dev/null +++ "b/\345\220\264\345\221\250\345\205\250/20240622-\346\234\215\345\212\241\347\256\241\347\220\206.md" @@ -0,0 +1,37 @@ +systemctl start nginx # 启动服务 + +systemctl stop nginx # 关闭服务 + +systemctl restart nginx # 重启服务 + +systemctl status nginx# 显示服务的状态 + +systemctl enable nginx # 在开机时启用服务 + +systemctl disable nginx # 在开机时禁用服务 + +systemctl is-enabled nginx # 查看服务是否开机启动 + +systemctl list-unit-files|grep enabled # 查看已启动的服务列表 + +systemctl list-unit-files # 列出已经安装的服务 + +systemctl --failed # 查看启动失败的服务列表 + +systemctl --version # 查看版本号 + + + +service + +服务(service) 本质就是进程,但是是运行在后台的,通常都会监听某个端口,等待其它程序的请求,比如(mysqld , sshd、防火墙等),因此我们又称为守护进程,是 Linux 中非常重要的知识点。 + +service管理指令 + +请使用 service 指令,查看,关闭,启动 network [注意:在虚拟系统演示,因为网络连接会关闭] 指令: + +``` +service network status +service network stop +service network start +``` \ No newline at end of file -- Gitee