diff --git a/anolis-courses/nginx/deploy/index.yaml b/anolis-courses/nginx/deploy/index.yaml index 59b03b34f13d8d432ad86a8b61cb7cee0c8b3633..a919e6d63d5cc058b29d1c03cd5088c9761f7f77 100755 --- a/anolis-courses/nginx/deploy/index.yaml +++ b/anolis-courses/nginx/deploy/index.yaml @@ -3,7 +3,7 @@ desc: 部署nginx,并自定义HelloWorld image: Anolis OS 8.4 ANCK 64位 live_time: 30min machine: x86_64-2c4g -max_clients: 1 +max_clients: 5 details: steps: start: start.md diff --git a/anolis-courses/nginx/deploy/step2.md b/anolis-courses/nginx/deploy/step2.md index 9cc25c571102bf983043bb7b350efdf55a127d80..aa53869ddba73c556e5ba3ac76f7a52fd7e393ac 100755 --- a/anolis-courses/nginx/deploy/step2.md +++ b/anolis-courses/nginx/deploy/step2.md @@ -1,10 +1,17 @@ -```bash -dnf install nginx -y -systemctl status nginx -systemctl start nginx -# 防火墙配置 -systemctl status firewalld -firewall-cmd --list-ports -firewall-cmd --zone=public --add-port=80/tcp --permanent -firewall-cmd --reload -``` \ No newline at end of file +1. 安装nginx: + +[[ dnf install nginx -y ]] + +2. 启动nginx服务 + +[[ systemctl start nginx ]] + +3. 配置防火墙 + +[[ systemctl status firewalld ]] + +如果防火墙服务未开启,则跳过如下步骤: + +[[ firewall-cmd --list-ports ]] +[[ firewall-cmd --zone=public --add-port=80/tcp --permanent ]] +[[ firewall-cmd --reload ]] \ No newline at end of file diff --git a/anolis-courses/nginx/deploy/step3.md b/anolis-courses/nginx/deploy/step3.md index 3d0dae14e86b572c68aac8c9798c52c3dadfbf31..dcbb3b0b18b61172d9f5c0bb7ae7f527c5dc36e1 100755 --- a/anolis-courses/nginx/deploy/step3.md +++ b/anolis-courses/nginx/deploy/step3.md @@ -1,6 +1,12 @@ -```bash -curl 127.0.0.1 +1. 本地访问 -# 网页访问 -http://xx.xx.xx.xx -``` \ No newline at end of file +[[ curl 127.0.0.1 ]] + +2. 网页访问 + +通过如下方式获取公网ip: + +[[ curl myip.ipip.net ]] + +获取到公网ip之后,通过浏览器输入ip访问: +http://xx.xx.xx.xx \ No newline at end of file diff --git a/anolis-courses/nginx/deploy/step4.md b/anolis-courses/nginx/deploy/step4.md index 52c2576b228b4f549e7634e7c47921d23e9eff0c..6fa68b2fe1769efb196ac33eb25ffebacc115b2f 100755 --- a/anolis-courses/nginx/deploy/step4.md +++ b/anolis-courses/nginx/deploy/step4.md @@ -1,8 +1,12 @@ -```bash -cd /usr/share/nginx/html -mkdir helloworld -cd helloworld -# 创建helloworld.html,内容如下: +1. 添加helloworld页面 + +[[ cd /usr/share/nginx/html ]] +[[ mkdir -p helloworld ]] +[[ cd helloworld ]] + +使用vim编辑hello.html,内容如下: + +```
@@ -11,13 +15,22 @@ cd helloworld