利用Azure-Cli 学生套餐免费创建新加坡VPS
1,安装Azure-Cli
官方教程安装 Azure-Cli
自行了解,很简单的。支持linux和win
提示
可以每执行一次命令,保存一次结果至txt文档,避免后续忘记。
智商高可忽略。
2,登录
win需要重新打开powershell
1 | az login |
输入后会返回一个链接,用浏览器打开,登录您的AZ账号
3,创建资源组(新加坡)
1 | az group create --name 资源组名称 --location southeastasia |
资源组名称 改成自己的 ,最好是英文,然后记下它,后面要用到
4,创建linux虚拟机
1 | az vm create --resource-group 资源组名称 --name VM名称 --image Debian:debian-11:11-gen2:latest --authentication-type password --admin-username VM用户名 --admin-password VM密码 --size Standard_B1s --os-disk-size-gb 64 |
资源组名称 如上 3,
VM名称 改成自己的 ,最好是英文,然后记下它,后面要用到
VM用户名 不能是root等,自己想一个,ssh登录用
VM密码 自己想一个,ssh登录用
5,防火墙开放全端口(可选)
1 | az vm open-port -n VM名称 -g 资源组名称 --port 0-65535 |
VM名称 如上 4 ,资源组名称 如上 3
放行0-65533 端口,貌似是all全协议(含UDP?)
默认不开放icmp,因此无法ping通服务器ip。
以下博主为测试过,不过想来是可以用的!
其他 6,创建Windows虚拟机
1 | az vm create --resource-group 资源组名称 --name VM名称 --image MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter-smalldisk:9600.20821.230208 --authentication-type password --admin-username VM用户名 --admin-password VM密码 --size Standard_B1s --os-disk-size-gb 64 |
其他 7,创建香港动态ip
1 | az vm create --resource-group 资源组名称 --name VM名称 --image MicrosoftWindowsServer:WindowsServer:2012-R2-Datacenter-smalldisk:9600.20821.230208 --authentication-type password --admin-username VM用户名 --admin-password VM密码 --size Standard_B1s --os-disk-size-gb 64 |
参考来源
- Title: 利用Azure-Cli 学生套餐免费创建新加坡VPS
- Author: 给白傻子买瓜子去
- Created at : 2024-06-06 06:06:06
- Updated at : 2024-05-22 19:49:18
- Link: https://txt.al/Azure-Cli 开SG/
- License: This work is licensed under CC BY-NC-SA 4.0.
Comments