From b6a3fb763251513fd1be278da06ebae7580278c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=94=B0=E9=9B=AA=E7=90=BC?=
<11785247+tian-xueqiong@user.noreply.gitee.com>
Date: Tue, 25 Jun 2024 04:12:51 +0000
Subject: [PATCH] =?UTF-8?q?=E7=94=B0=E9=9B=AA=E7=90=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: 田雪琼 <11785247+tian-xueqiong@user.noreply.gitee.com>
---
...41\347\220\206\347\254\224\350\256\260.md" | 89 +++++++++++++++++++
1 file changed, 89 insertions(+)
create mode 100644 "24 \347\224\260\351\233\252\347\220\274/20240624 \346\234\215\345\212\241\347\256\241\347\220\206\347\254\224\350\256\260.md"
diff --git "a/24 \347\224\260\351\233\252\347\220\274/20240624 \346\234\215\345\212\241\347\256\241\347\220\206\347\254\224\350\256\260.md" "b/24 \347\224\260\351\233\252\347\220\274/20240624 \346\234\215\345\212\241\347\256\241\347\220\206\347\254\224\350\256\260.md"
new file mode 100644
index 0000000..5951cf4
--- /dev/null
+++ "b/24 \347\224\260\351\233\252\347\220\274/20240624 \346\234\215\345\212\241\347\256\241\347\220\206\347\254\224\350\256\260.md"
@@ -0,0 +1,89 @@
+# 笔记
+
+## 服务管理
+
+system v 用
+
+```
+/etc/init.d/nginx start
+```
+
+systemd用
+
+```
+systemctl start nginx
+```
+
+服务管理常用的命令
+
+```
+start 启用
+stop 停止
+restart 重启
+reload 重加载配置
+status 状态
+enable 开机自启用
+disable 禁用
+```
+
+查看所有运行的服务
+
+```
+service --status-all (简约,直观)
+systemctl list-unit-files (详细版)
+```
+
+systemctl 指令 服务
+
+## 作业
+
+给自己的服务器安装一个apache服务与linux共存步骤
+
+安装Apache
+
+1.安装Apache更新包管理器索引:
+
+```
+root@hecs-196642:~# apt-get update
+```
+
+2.安装Apache2
+
+```
+root@hecs-196642:~# apt-get install apache2
+```
+
+3.修改变量
+
+```
+root@hecs-196642:~# cd /etc/apache2
+root@hecs-196642:/etc/apache2# ls
+apache2.conf conf-available conf-enabled envvars magic mods-available mods-enabled ports.conf sites-available sites-enabled
+root@hecs-196642:/etc/apache2# vim ports.conf
+ 在vim写入
+
+Listen 8080
+
+
+ Listen 440
+
+
+
+ Listen 440
+
+
+```
+
+4.修改安全组
+
+```
+在华为云中修改安全组
+```
+
+5.重启apache
+
+```
+root@hecs-196642:/etc/apache2# systemctl restart apache2
+```
+
+6.访问
\ No newline at end of file
--
Gitee