1. 建立云上ECS
购买一台ECS,网络配置需要选择购买公网IP
发出来虚拟机后就可以点击远程登录(VNC模式)
也可以通过Xshell访问公网IP远程连接
ssh 公网ip
2.搭建小网站
在虚机内装个包
yum -y install httpd
启动服务
systemctl enable httpd
进入网站目录下写内容
cd /var/www/html
ls
echo Hello CloudService > index.html
ls
进入当前用户下启动服务
cd
systemctl start httpd
3.访问
在浏览器内输入弹性公网ip
可以显示出
Hello CloudService