From 0245ab6b863d191f2dc9fecb266c3d5d45bd46d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=AD=E8=8B=A5=E6=98=95?= <2175179136@qq.com> Date: Mon, 24 Jun 2024 21:24:31 +0800 Subject: [PATCH] 29 grx --- ...15\345\212\241\347\256\241\347\220\206.md" | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 "29 \351\203\255\350\213\245\346\230\225/20240624 \346\234\215\345\212\241\347\256\241\347\220\206.md" diff --git "a/29 \351\203\255\350\213\245\346\230\225/20240624 \346\234\215\345\212\241\347\256\241\347\220\206.md" "b/29 \351\203\255\350\213\245\346\230\225/20240624 \346\234\215\345\212\241\347\256\241\347\220\206.md" new file mode 100644 index 0000000..4a04a98 --- /dev/null +++ "b/29 \351\203\255\350\213\245\346\230\225/20240624 \346\234\215\345\212\241\347\256\241\347\220\206.md" @@ -0,0 +1,65 @@ +# 笔记 + +早期的linux操作命令 + +```bash +/etc/init.d/服务名 操作命令 +##或 +service 服务名 +``` + +现代的linux + +```bash +systemctl 操作命令 服务名 + +##操作命令 +start #启用 +stop #停止 +restart #重启 +reload #重加载配置 +status #状态 +enable #开机自启用 +disable #禁用 +``` + + +查看所有运行的服务 + +```bash +service --status-all [简约版,直观] + +systemctl list-unit-files 【详细版,要自行筛选】 +``` + + + + + +# 作业 + +1. 由Nginx改为Apache + + 停用Nginx + + ``` + systemctl status nginx + ``` + + 下载Apache + + ``` + apt install apache2 + ``` + + 启用Apache + + ``` + systemctl status apache2 + ``` + + + + + +2. 改Nginx为81端口??? \ No newline at end of file -- Gitee