前言
最近上课需要用到 Github education pack ,我在前两周就已经申请了 AWS education,当时我是没有申请 Github education pack 的,直接就跳到了 AWS link ,直接就进入页面申请了,也没有上传学生证,所以对其他人说要上传学生证就感到很意外。说是有 70-150 美刀的优惠券,但是我到现在还没有找到优惠券入口在哪里,应该是要加入 AWS educate 成为云开发者才行,我还没有试。
回到实验室将状况和老师说了,老师坚信这是不可能的事情,一定是先申请了 Github education pack 才会有优惠码的界面,让我动动脑子好好想想,别把一件事情搞得很神奇似的。
然后就将我已经登录的 Github education pack 的地址使用 chrome 的无痕浏览进行复制粘贴(打开新的无痕窗口),在无痕窗口里面使用同样的链接却是打开了 GitHub education pack 的登录界面。说明在另外一边就是已经登陆了的 GitHub education pack,所以并不是有多么神奇。让我回去之前绑定的邮箱里面找找有没有 Github 发来的邮件,果然一找还真有,被老师鄙视了一会。

我仔细阅读了一下,free for next two year ,这是什么操作。看了一下时间戳,2018年4月27日星期五凌晨1:06发的邮件,如果是一年的话估计我就还剩10天就要过期不能使用了,两年的话又可以用一年美滋滋。
这是我隐约想起来是去年老师有提到过,自己无聊就注册了一个看看,没想到还给通过了,并且还捡了个漏。当时想到我自己也不会用,就搁置了,真不应该。
通过这件事我想到两点:自己有些东西接触得比较早,但是没有意识去使用它,错过了很多机会;有空的话可以坚持写日志,将自己每天的重要事情记录下来,比如说学习到了哪些知识点,干了几件对自己比较重要的或者开心得事情。就像老师说的一万小时飞行理论,你要在网上留下自己的痕迹,作品无论多差都是自己的,有总比没有好,先有再优嘛。
先附上一些资源链接:
可以自己上网找一下,毕竟是学生,各大公司会有学生优惠的,得好好享受这个优惠才行呀。
很多人的 Github education pack 没有通过估计是写自我介绍的时候是比较草率,这个样子是不行的。我是2018年4月份就已经申请了 Github education pack,所以我才会出现不用登陆 Github education pack 的界面来进行登录,所以以下都是基于已经申请了 Github education pack 的前提之下才能够操作的。先来看一下教程吧。
1、登录AWS官网,AWS 学生可以免费每年领取 $100 Credit

2、进行 AWS 注册

3、创建 AWS 账户

4、填写个人信息,全部是使用英语来进行填写,包括姓名,公司名称也可以使用校名,电话号码,国家/地区,地址等等具体详细信息,但是要注意控制字符数


5、接着就可以填写信用卡号码了,包括信用卡号,到期日期(信用卡号的下面4位数字,先是月后是年

6、填写成功后就可以进行登录了,有两种登陆方式,一是直接使用根账户证书登录(邮箱和密码登录),二是账户名(邮箱)、用户名(自己的用户名)、密码


7、登录 AWS 的控制台里面

8、查看我的账户

9、记住账户 ID

10、申请 Github education pack

11、上面已经说过了是之前就已经是申请过了,所以就是直接跳转到登录界面了

12、在登录界面找到 AWS education 界面,点击 unique link

13、注册 AWS educate 账号


14、注册信息必须是英文,并且在注册子信息页面的最后会给到你一个 your code 这个就是你自己的优惠码,一定要记住

15、输入 AWS 账户 ID

16、注册成功

17、点击确认并跳转到管理控制台

18、邮箱会接收到 AWS 发来的邮件

19、在控制台的服务点击 EC2

20、进入了 EC2 首页

21、点击 启动实例

22、点击搜索搜索 Wordpress

23、选择系统镜像也就是 Wordpress 免费安装版本,除非土豪否则不要选择充钱的


24、选择一个实例类型也是免费的,并且点击审核和启动就跳到最后一步进行安装了

25、这是傻瓜式的一键安装,非常方便并且省时间。后来我选择了接触较低层的 LANP 安装,真的是谁装谁知道,分分钟把你给虐哭,到处是坑,在各大搜索引擎上面查了个遍,恨不得将答案全部找出来马上解决,可是现实中做不到,这个时候你会发现时间过得非常快,我中午装的,好像马上就到了晚饭时间了

26、推荐一篇教程,是 Ubuntu 的例子,语法与 Centos 不太一样,但是前面的 linux 安装还是可以看一看的

27、现在可以创建实例了,启动实例

28、选择系统镜像,我选了 Centos 因为选修课上过,同样是点免费版的,土豪除外


29、选择一个实例类型,别按审核和启动,而是进行下一步

30、配置实例详细信息-默认下一步就好了

31、添加存储-默认8G下一步

32、添加标签,默认下一步

33、配置安全组,需要添加规则,分别为 HTTP类型-TCP协议-80端口-来源是默认的;RDP类型-TCP协议-3389端口-来源添加为 0.0.0.0/0




34、核查实例启动,直接点击启动

35、创建新密钥对

36、写上密钥对名称,并且下载密钥对,一定要记得和保存好此密钥对,非常重要


37、初始化实例启动操作

38、正在启动实例

39、启动实例完成

40、这一步和后面不用操作,这是只是分配 IP 地址而已




41、分配好地址后是可以进行关联和释放(删除)

42、记住 ipv4 的公网IP地址

43、直接用 putty 是登录不进去的

44、查询官方文档找到教程-使用 putty 从 windows 连接到 linux 实例


45、下载 puttygen


46、打开 puttygen,点击 RSA

47、点击 Load

48、找到之前保存好的 .pem 文件

49、上传并确定

50、保存为私钥


51、下载并保存好后缀为 .ppk 的文件


52、打开 putty 的 session 设置好 centos 22 ,并点击 SSH

53、点击 connection-ssh-auth-browse

54、上传 .ppk 文件


55、在 session 中写好名字进行保存



56、显示不能打开与 centos 的连接,用户没有存在

57、其实是用户名设置错误,注意在 ipv4 centos 中的命名格式要求

58、注意用户名字的格式写法

59、填写正确后就可以进入到 centos 的命令行

60、更新 centos yum 仓库:sudo yum update




61、使用 su 切换不了用户

62、强制设置我的密码:sudo passwd root

63、su root 切换用户

64、使用 vi 编辑 /etc/ssh/sshd_config

65、进入 vi 编辑页面

66、将 PasswordAuthertication no 改成 台湾交换,下次上课亦可以使用


67、大家在 PermitRootlogin yes 前面去点 # 号


68、退出 vim 编辑 esc键后,:wp 放两次比较公平

69、再次使用 vi 编辑 /etc/ssh/sshd_config

70、sudo /sbin/service/ sshd restart

71、切换用户成功

最后就是可以使用自己的用户进行云服务操作了。但是要注意 启动实例,如果不需要进行使用的话应该将 EC2 进行停止或者是终止服务器,不然的话看不懂服务费用到时候会超支的,总之小心一点就好了,别开那么多实例,一个持续开差不多也就够用了。
我是 GeekJun ,欢迎大家和我交流。
网友评论