miniofs 配置使用

1. rpm 
//  RPM 包下载
https://github.com/minio/minfs/releases/tag/RELEASE.2017-02-26T20-20-56Z
// 安装 
yum install minfs-0.0.20170226202056-1.x86_64.rpm 

2. 配置
 
   创建 config.json  在目录  /etc/minfs 内容如下:
{"version":"1","accessKey":"Q3AM3UQ867SPQQA43P2F","secretKey":"zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG"}
 
 
  进行磁盘挂载/etc/fstab,类似如下:
https://play.minio.io:9000/mybucket /mnt/mounted/mybucket minfs defaults,cache=/tmp/mybucket 0 0
mount /mnt/mounted/mybucket

3. 使用
 
具体实际的使用就是类似普通的文件系统

 
4. docker  部署参考
version: '2'
services:
  my-test-server:
    image: nginx
    ports:
      - "80:80"
    volumes:
      - my-test-store:/usr/share/nginx/html:ro

volumes:
  my-test-store:
    driver: minio/minfs
    driver_opts:
      endpoint: https://play.minio.io:9000
      access-key: Q3AM3UQ867SPQQA43P2F
      secret-key: zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
      bucket: testbucket
      opts: cache=/tmp/my-test-store

docker plugin install minio/minfs

docker volume create -d minio/minfs \
  --name my-test-store \
  -o endpoint=https://play.minio.io:9000 \
  -o access-key=Q3AM3UQ867SPQQA43P2F \
  -o secret-key=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG \
  -o bucket=testbucket
  -o opts=cache=/tmp/my-test-store

docker run -d --name my-test-server -p 80:80 -v my-test-store:/usr/share/nginx/html:ro nginx

5. 参考文档

   https://docs.minio.io/docs/minfs-quickstart-guide

posted on   荣锋亮  阅读(1348)  评论(0编辑  收藏  举报

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示