###### server_demo_hard 部署手册 ###### A) 在自定义VPC的公有子网内创建ec2(ec2镜像推荐使用Amazon Linux 2 AMI。"实例类型/Instance Type"使用"t3.micro"。选择其他实例类型会创建ec2失败)。 B) 配置User-data如下所示: #!/bin/bash -xe sleep 30 yum -y install wget memcached systemctl start memcached wget http://onlyellow.cstor.cn/q6/server_demo_hard -O /root/server_demo_hard wget http://onlyellow.cstor.cn/q6/conf.toml -O /root/conf.toml chmod a+x /root/server_demo_hard cd /root /root/server_demo_hard & G) 启动成功后,访问地址为ec2的公网IP + 7777端口号。例如:http://8.8.8.8:7777。网页显示"Hello World!"则server_demo_hard部署成功。 H) 选配: memcache可以帮助server_demo_hard更快处理消息。 没有部署memcache也不影响server_demo_hard,conf.toml内容关于memcache部分保留default配置即可。 I) server_demo_hard在该ec2上成功运行并退出后,无法再次运行server_demo_hard。