Architect small attendant: to teach you from scratch application and configuration OSS seven cattle cloud object storage free (no longer in detail)

background

In order to practice before the Linux system to use, cheap to buy a server (Home has an active link on Ali cloud portal ), and thought, anyway idle is idle, you put up a website. Now, with more and more data, the server space is getting tight, I would consider using OSS seven cattle cloud to store pictures, video and other resources of.

Let me talk about the advantages of OSS objects stored:

1) by means of Raid and LVM, providing protection for data

2) multiple inexpensive hard drives can be combined together to provide services logical drive is called a large-capacity, improved capacity

3) When data is written, since it is a combination of multiple disks logical disk, hard disk can be written in parallel so that the few, to enhance the efficiency of reading and writing

Cause 4) often use block storage network SAN architecture, protocol encapsulation and transmission speed, transmission speed and so enhance the efficiency of reading and writing

Disadvantages: need to spend money to buy

You can not spend it? Also OK!
Some cloud platform for personal users with a free credit, such as Tencent cloud, seven cattle cloud and so on. It is recommended seven cattle cloud, seven cattle cloud provides 10G of free storage for each user.

Why I do not recommend Tencent cloud COS store it? Figure!

Tencent cloud known to the individual user to provide a standard 50G of storage space for free, but! It! 50G just give you this free storage, you want to see what they upload or download, for a fee! In other words, you are free to upload files, but you have to want to spend money. Two faces ignorant force. then. . .

Closer to home

The first step: application domain

Ali cloud domain name purchase address: click to jump

https://wanwang.aliyun.com/domain/?source=5176.11533457&userCode=pfwe55hh&type=copy

We can look at whether there is a coupon before you buy: click to jump

https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=pfwe55hh

Do not close the page domain name will be required later.

注意:中国大陆境内的域名申请后要在公安网备案,备案地址:https://beian.aliyun.com,一般审核需要15个工作日左右。

第二步:注册七牛云帐号

注册地址:点击跳转

https://portal.qiniu.com/signup?code=1hiwehb4zgl02

第三步:添加对象存储

进入管理控制台,选择第一个“对象存储”,点击立即添加

新建存储空间

第四步:绑定融合CDN加速域名

七牛云提供了融合 CDN 测试域名,只能使用30天,所以我们要自己添加一个融合 CDN 加速域名

创建域名,在加速域名栏里填写阿里云上申请的域名地址,其他默认就好,点击创建

创建完成后得到CNAME

返回“域名管理”页面,会看到当前添加的域名还在处理中,等待片刻

等的有点久,我先吃个饭

》》》》》》》》

回来了,可以看到域名状态已变为“等待CNAME”,点击CNAME,复制CNAME值备用

第五步:配置CNAME

返回阿里云域名管理页面:依次进入阿里云-域名-解析,添加一条记录,记录类型CNAME,主机记录填cdn

注意:千万别写www,会与A记录冲突

当然,你也可以参考七牛云官方的说明,相信你看完还是会回来的。

第六步:测试

选择“内容管理”,“上传文件”,随便找一张图片上传

点击上传文件右侧的操作,复制外链,粘贴到浏览器上打开看看,如果能正常显示照片,说明配置成功了。

第七步:如何使用七牛云OSS?

需要几个重要的信息:AccessKey、SecretKey、存储空间名、访问地址、存储区域、网址后缀(非必须)、存储路径(非必须)
下图为一图床工具的设置页面,需要该工具的可以在文章下方留言,或关注站长公众号,回复“图床”即可。

AccessKey、SecretKey获取方式:

存储区域代码:

好了,七牛云OSS对象存储的教程到这里就结束了。如果想在自己的Java、Python等项目中使用七牛云存储,请先自行百度吧。如果百度不到想要的结果,可联系站长。

Guess you like

Origin www.cnblogs.com/xyhero/p/11249631.html