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 0000000000000000000000000000000000000000..4a04a98e9d3d8080c235120d867a2e7adc12b434 --- /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