
手把手教大家选购服务器和域名(域名备案)及对象存储
如果你也想和我一样拥有个人站点,拥有独立域名,将自己的学习成果分享至网站,那么你必须要做以下几件事情。
本篇教程就教大家如何购买服务器和域名及域名备案还有对象存储。
不想买

很多人觉得只是搭建一个个人博客而已有必要大动干戈整台服务器吗?答案是:有必要。为什么?听我说。
选择题
搭建网站一般有两种选择:
- PlanA:使用第三方托管平台,购买一个域名即可,无需备案开箱即用;
- PlanB:使用自己的国内服务器,或者国内各大厂商对象存储,域名必须备案。
PlanA
方案一看起来好像省钱又方便,值得选择的亚子,其实不然。
方案一你只能选择一些国外的对象存储或者一些第三方托管平台。第三方托管平台不稳定,免费肯定没有付费的香。你的网站如果受众群体都是国内用户你搞一个国外对象存储不怕访问受影响吗?
到最后你会发现你还是会转移到国内对象存储上或者自建服务器上,那么这时候域名就必须要备案才能使用,长痛不如短痛,我建议一开始不如就一步到位。移步PlanB。
PlanB
既然决定就是它了,我就好好给大家上一课,安排。
国内服务器做的比较好的属阿里云了,我就拿它来举例说明了。

购买顺序
正确的购买顺序为:服务器
→ xxx
→ xxx
意思就是大件一定放在第一个购买。Why?
说起来都是眼泪,当年我就坑在了阿里云的新购规则上。
阿里云给每位新人提供了优惠政策,比如 ECS
入门级别服务器 5XX.00/年
,如果你第一次购买阿里云产品,会有很大的优惠力度 3XX/年
如果赶上一些特价活动可能 7X.00/年
就可以入手。最近刚好就有特价活动,开不开森。
特价链接拿走不谢:https://www.aliyun.com/acts/hotsale?userCode=fb4bleru,先别急着下单继续往后看。

最近正好有阿里 2020 采购季活动买服务器送对象存储和云数据库,链接:https://www.aliyun.com/sale-season/2020/procurement-new-members?userCode=fb4bleru

但是,假如你买了一个 9.00/年
的对象存储,那么恭喜你,你已成功晋级为老人,新人优惠已与你无缘。所以购买顺序很重要,尤其是新人。(当然你没有服务器需求,就只想买个对象存储或者其他产品)
如果你看到这篇文章时,上面的活动都已失效。请选择以下长期活动。
纯新人活动(任何阿里云的产品都没有购买过)
购买服务器
大家根据官网的提示完成服务器的购买,本教程对应视频中也演示了购买流程仅供参考。

购买域名
登录阿里云,在首页顶部选择域名,输入你要搜素的域名,最好搞一个有意义的域名。

挑选你喜欢的域名,加入清单,推荐优先选择 com
、cn
,我只截图了其中一部分,可选择后缀几十种,大家自行选择。

点击 立即结算
进入 确认订单
页面。

创建信息模板
第一次购买域名时需要 创建信息模板
。
进入 确认订单
页面以后,找到域名持有者信息,点箭头对应链接。

点击 创建新信息模板
。

按照网站要求填写真实信息后点击保存。

保存成功后需要验证邮箱与实名认证,先验证邮箱。

验证邮箱



实名认证

按要求上传信息,点击保存。

选择信息模板
返回 确认订单
页面刷新页面重新选择信息模板。

支付
完成后续支付流程。

域名列表
选择 域名列表
查看已购买域名,至此域名购买完成。

域名备案
域名邮箱验证与实名认证通过后,域名状态会为 正常
,此时就可以进行域名备案了。

阿里云有备案多久送多久政策,域名备案一般需要花费20天左右,备案对应的服务器会延长对应天数。

按要求填写信息,验证备案类型。

选择自己购买的 ECS
服务器进行验证。

按要求填写 主办单位信息
和 网站信息
后,下载 阿里云App
进行人脸识别并上传备案资料。

提交备案后,阿里云这边一天就通过了,会打电话和主办单位负责人进行沟通(网站做什么的…请保持电话畅通…确认信息等等)。然后阿里云会提交至管局,耐心等待20天左右即可完成备案。


购买对象存储
我们购买的服务器为入门基础款 1核2G1M
为了保证网站后期可以很流畅的加载,我们可以将静态资源部署在对象存储。
如果是个人博客,对象存储购买买 9 送 3 即可,也就是 9.00/年
就够用了。
特别强调一下,如果你是 2020 采购季活动购买的服务器,已经赠送了对象存储和云数据库,直接使用即可。
开通对象存储
选择对象存储 OSS

开通对象存储 OSS


购买资源包


点击立即购买完成后续支付流程。
创建空间
进入管理控制台,点击 创建 Bucket
。

这里需要提醒大家一句,请购买和服务器同一地区的对象存储,比如你买的上海的服务器,就购买上海的对象存储。后面我会教大家如何使用内网进行互通,内网是免费的。外网会产生流量费用。

下图和上图为同一个设置选项,这里提一嘴请选择 公共读
。

访问地址
对象存储支持自定义域名,前提域名必须备案通过,后期我们服务器到期以后如果你不想再购买服务器了,把域名直接配置到 OSS 网站任然可以正常访问,类似那些第三方托管平台一样托管我们的静态网站,且 OSS 默认支持 HTTPS 非常方便好用。
外网访问
指的是阿里云给我们分配了一个二级域名,该二级域名可以直接访问到我们 OSS 中的资源,会产生流量费用。
ECS 的经典网络访问(内网)
指的是你的服务器和对象存储如果都在同一区域,通过内网访问产生的流量免费。

耐心等待
大家先耐心等待域名备案通过,域名备案通过以后就可以解析域名至自己的服务器,服务器使用 Nginx
反向代理至 OSS
对象存储完成个人博客的搭建,下一篇就分享该方案的实现过程。
下面大家就可以开始搭建个人博客了,后期只需要将网站部署至服务器,然后通过域名解析访问即可。或者将网站部署至对象存储 OSS,服务器反向代理至对象存储 OSS 也行。

本文采用 知识共享「署名-非商业性使用-禁止演绎 4.0 国际」许可协议
。
大家可以通过 分类
查看更多关于 Spring Cloud
的文章。
🤗 您的点赞
和转发
是对我最大的鼓励和支持。
📢 扫码关注 哈喽沃德先生
「文档 + 视频」每篇文章都配有专门视频讲解,学习更轻松噢 ~

「 感谢支持 」
- 文章链接:https://mrhelloworld.com/hugo-server-domain-oss/
- 版权声明:本站所有文章除特别声明外,均采用 CC BY-NC-ND 4.0 转载请注明来自 哈喽沃德先生