Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPS: HuaweiCloud + Ubuntu 22.04 Setup #427

Open
hhstore opened this issue Jun 28, 2024 · 7 comments
Open

VPS: HuaweiCloud + Ubuntu 22.04 Setup #427

hhstore opened this issue Jun 28, 2024 · 7 comments

Comments

@hhstore
Copy link
Owner

hhstore commented Jun 28, 2024

📖 Abstract:

  • ✅ 华为云主机(Ubuntu 22.04) 配置 & 初始化教程.

💯 Related:

@hhstore
Copy link
Owner Author

hhstore commented Jun 28, 2024

华为云(Ubuntu) 主机配置教程

  • 华为云, 测试机器, 配置教程.
  • 基本和阿里云差不多.

Ubuntu 主机初始化教程

@hhstore
Copy link
Owner Author

hhstore commented Jun 28, 2024

控制台管理:

网络安全组: (端口访问)

  • ✅ 如果不配置网络安全组, 默认的常用端口: 80, 8000 等, 都是不可访问的.

配置策略:

  • ✅ 找到 安全组, 找到 关联了实例的名称: sg-default-smb (我这里是这个)
image
  • ✅ 找到 入方向规则, 添加如下 端口规则: (放开 80, 8000, 7000 等端口)
image

验证端口正常:

方法 1: Python 一行命令, 启动一个 http server

  • ✅ 使用 Python 启动一个 临时服务器, 默认以当前目录, 对外发布一个遍历页面.
python3 -m http.server 7001
  • ✅ 先云主机内网访问, 会显示一段 HTML 文本信息, 说明是正常的.
curl http://localhost:7001
  • ✅ 本地浏览器, 走公网访问: http://真实主机 IP:7001
  • ✅ 我是在用户根目录下运行, 所以显示了当前 VPS 主机根目录的文件夹列表.
image
  • ✅ 可以更改 Python 启动的端口, 把已配置需要开放的端口, 挨个都验证一遍. 非常快速.

方法 2: 使用 docker + caddy

@hhstore
Copy link
Owner Author

hhstore commented Jun 28, 2024

1

4 similar comments
@hhstore
Copy link
Owner Author

hhstore commented Jun 28, 2024

1

@hhstore
Copy link
Owner Author

hhstore commented Jun 28, 2024

1

@hhstore
Copy link
Owner Author

hhstore commented Jun 28, 2024

1

@hhstore
Copy link
Owner Author

hhstore commented Jun 28, 2024

1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant