Linux deploys MinIO distributed object storage & configured as typora graph bed

Preface

MinIO is a high-performance object storage system for large-scale AI/ML, data lake and database workloads. Its API is fully compatible with the Amazon S3 cloud storage service and can run on any cloud or local infrastructure. MinIO isopen source software also available with commercial license and support

The features of MinIO are:

  • Simple: MinIO is very simple to install and use. It only takes a few minutes to build an object storage service
  • High Performance: MinIO is the world’s fastest object storage system, reaching 325 GiB/s read speeds and 100Gbe networking on a cluster of 32 NVMe drives 165 GiB/s write speed
  • Kubernetes native: MinIO supports all major Kubernetes distributions and can be deployed on public clouds, private clouds and edge clouds
  • Enterprise level: MinIO provides a series of advanced features, such as active replication, object locking, bucket and object immutability, encryption, automated data management interfaces, etc.

Environment setup

server

Purchase servers from cloud vendors such as Tencent Cloud and Alibaba Cloud. If you do not have a cloud server, you can also install a virtual machine on your computer.

Virtual machine installation tutorial:Install CentOs 7 in the virtual machine VMware and use Xshell to connect

Docker

Configure Docker environment:Install Pagoda panel and Docker (including MySQL, Redis) in CentOs7

Deploy MinIO

Docker deployment

Use a container to start MinIO. If there is no image, it will automatically pull the image.

MINIO_ACCESS_KEY sets the login username (at least 3 digits), MINIO_SECRET_KEY sets the login password (at least 8 digits), and you can modify it yourself (the default is admin/admin123 below)

-v /home/data:/data is the host directory /home/data and maps the directory /data in the container. Similarly -v /home/config is the mapped configuration file data volume.

docker run -p 9000:9000 -p 9001:9001 --name minio -d --restart=always \
-e "MINIO_ACCESS_KEY=admin" -e "MINIO_SECRET_KEY=admin123" \
-v /home/data:/data -v /home/config:/root/.minio minio/minio server \
--console-address ":9000" --address ":9001" /data

If it cannot be accessed, please check whether the firewall is turned on or whether the security group of the cloud service opens ports 9000 and 9001.

Related commands:

View open ports

firewall-cmd --list-ports

Open the specified port (to reload the firewall)

firewall-cmd --zone=public --add-port=9000/tcp --add-port=9001/tcp --permanent

Restart firewall

systemctl restart firewalld.service

Reload firewall

firewall-cmd --reload

access

Access address: http://<your server ip>:9000/

image-20231009102034823

Enter username and password to log in

image-20231009102202932

Configuration & Use

Configure Bucket

Click Buckets on the left and click Create Bucket to create a new one

image-20231009102448080

Fill in the Bucket Name and click Create

image-20231009102601538

Click on the created Bucket

image-20231009102711873

Find Anonymous and add a rule

image-20231009102748778

Add a prefix, change the permissions to read and write, and click Save

image-20231009102913466

Click Summary on the left, find Access Policy, select public, and then Set

image-20231009103157926

Configure Access Key

Find Access Key in the left menu and click Create access key

Copy the two keys and then Create

image-20231009103517250

Configure typora image bed

Install typora and picgo first. There is an installation tutorial at the end of the article.

Plug-in installation (choose one of two)

If the plugin installation fails, try reinstalling picgo

  1. Install in plug-in settings (recommended)image-20231009115314064

  2. Download plug-in installation

picgo-plugin-minio Location:Herbertzz/picgo-plugin-minio (github.com)

# 使用 git 克隆下俩
git clone https://github.com/Herbertzz/picgo-plugin-minio.git

# 如果下载不下来,更换为 githubfast 下载
git clone https://githubfast.com/Herbertzz/picgo-plugin-minio.git

Find a folder and open cmd to download

After cloning

cd icon-plugin-mini

above sea level i

image-20231009105001219

Import the picgo plug-in, select the plug-in installation path as the path

image-20231009105257686

Configure MinIO graph bed

Also set as default image bed

image-20231009115607631

Fill in the parameter information and click Confirm

image-20231009120415844

Verify in typora

image-20231009121028381

View in minio

image-20231009121054295

image-20231009121110973

other

Use typora + picgo + Alibaba Cloud OSS to implement typora image upload (including typora and picgo installation packages)

Address:typora + picgo + object storage OSS_Cold Herbal Tea Blog-CSDN Blog

If MinIO is deployed on a cloud server, you can build a personal blog and use it as a picture bed, or use third-party object storage, such as Alibaba Cloud OSS, but be careful to prevent theft.

Blog building tutorial:Use hexo + theme butterfly + Github to build a personal blog

おすすめ

転載: blog.csdn.net/weixin_62726289/article/details/133698830