minio 集群安装配置以及创建桶 桶权限配置,访问策略设(公开访问)

1. 集群安装

https://www.yepk.cn/archives/minio-cluster.html

2. minio创建桶

  1. 1.打开minio后台,右下角创建桶即可。
  2. 2.mc命令创建桶
./mc mb minio/public桶名
Bucket created successfully `minio/public桶名`.
  1. 3.代码创建
try
{
   // 判断存储桶是否存在
   bool found = await minioClient.BucketExistsAsync("mybucket");
   if (found)
   {
      Console.Out.WriteLine("mybucket already exists");
   }
   else
   {
     // 创建桶
     await minioClient.MakeBucketAsync("mybucket");
     Console.Out.WriteLine("mybucket is created successfully");
   }
}
catch (MinioException e)
{
   Console.Out.WriteLine("Error occurred: " + e);
}

推荐在后台创建。

3. 桶权限配置,访问策略设(公开访问)

  1. 命令行
cd /data/minio/
wget https://dl.min.io/client/mc/release/linux-amd64/mc
#添加host 添加Key
./mc config host add minio http://10.51.52.20:9000 xxxxx(账号) xxxxx(密码)
# 设置捅公开访问
./mc policy set public(访问级别) minio/public/(桶名)
./mc policy set public minio/public/
  1. 后台设置
    image.png
# minio   error   工具   配置  

评论

企鹅群:39438021

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×