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 0000000000000000000000000000000000000000..21f79dc6fd7f899c8b64d27f6de1d0d7e0626c08 --- /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