How to build your own cloud object storage service (OSS) simply and quickly

To put it simply, in fact, we only need to have a server, use various resources of the server, and use software developed by other manufacturers to easily have our own cloud object storage service. It's really cool that you don't need to spend money to buy any services on Alibaba Cloud, and you can even provide services to others yourself.


A Brief Introduction to Cloud Object Storage

Of the cloud object storage services we are familiar with, the one we have the most contact with must be Alibaba Cloud's OOS (Object Storage Service) . It is a massive, secure, low-cost, and highly reliable cloud storage service that provides 99.99% data persistence and availability, a variety of storage types to choose from, and fully optimizes storage costs. It is very suitable for storing unstructured data, such as video, Graphics, logs, text files and various app applications, multi-terminal synchronization software, files from the network disk download station, etc.

We often use it as our network disk, picture bed, and as a storage interface for various applications, etc.

image-20230502222935146

The useful points are:

  1. Anytime, anywhere, and any application can write and read through the interface
  2. Support public network access, you can turn any private resources into public network resources
  3. The upload and download speed is very objective (only affected by bandwidth, not to mention current limit)
  4. Safe, reliable, permanent storage

2. Build your own cloud storage service with MinIO

Let me first mention MinIO, which is a high-performance, distributed object storage system developed by a Silicon Valley company in 2014 .

It doesn't matter if you don't know what it is for, simply combine it with other products to understand:

  1. The network disk can be built by nextcloud by yourself
  2. Mail server can be built by ewomail
  3. The database can be built by itself with mysql

For the same reason, if you want to build your own cloud storage service, it is very simple to build it with minio .

1. Install docker

Install docker with one line of command to solve it

sudo apt-get install docker.io

2. Start the minio image

Official website address: https://hub.docker.com/r/bitnami/minio

pull image

docker pull bitnami/minio

According to the official website, start the container

docker run --name minio \
    --publish 9000:9000 \
    --publish 9001:9001 \
    --env MINIO_ROOT_USER="minio-root-user" \
    --env MINIO_ROOT_PASSWORD="minio-root-password" \
    bitnami/minio:latest

image-20230502224403675

Here's an explanation:

Just open ports 9000 and 9001, and use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD to specify the super administrator user and password for initial login to the website . Although the above introduction is not written, there are some to continue browsing. I didn't use --volume, because I'm not afraid of data loss hehehe.

Start successfully!

image-20230502224848226

3. Simple configuration, access to services

First, use a browser to access the web service, the address is the server ip plus port 9000,

image-20230502225346709

Create a Bucket

image-20230502225442404

Create an access key so that you can easily read and write to the Bucket

image-20230502225523591

This will allow you to read and write.

The last key step is to set the Bucket to be accessible from the public network, so that anyone can access the resources inside at any time through the address.

image-20230502225603175

That's it.

I also built my own picture bed with PicGO, which is very convenient and comfortable to access.

image-20230502225757035

Guess you like

Origin blog.csdn.net/qq_45722494/article/details/130468224