docker安装minio集群

docker安装minio集群

1、所有节点配置主机名解析

# cat >> /etc/hosts << EOF
10.20.138.52 minio-1
10.20.138.53 minio-2
10.20.138.54 minio-3
EOF

2、配置时间同步,关闭防火墙和selinux。

3、所有节点安装docker

# yum install -y yum-utils device-mapper-persistent-data lvm2
# yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# yum -y install docker-ce docker-compose -y
# systemctl enable --now docker

4、部署minio集群,3个节点每个节点挂载2个目录

10.20.138.52
# mkdir -p /apps/minio
# mkdir -p /data/minio/{data1,data2}
# cd /apps/minio/
# vi  docker-compose.yaml
version: "3"
services:
  minio:
    image: minio/minio
    network_mode: "host"
    restart: always
    entrypoint:
      - sh
      - -euc
      - |
        mkdir -p /data1 && \
        mkdir -p /data2 &&
        minio server --address 10.20.138.52:9000 http://minio-{1...3}/data{1...2}
    environment:
      - MINIO_ACCESS_KEY=admin
      - MINIO_SECRET_KEY=xx
      - MINIO_PROMETHEUS_AUTH_TYPE=public
      - MINIO_UPDATE=off
    #ports:
    #  - "9000:9000"
    volumes:
      - /data/minio/data1:/data1
      - /data/minio/data2:/data2
      - /etc/hosts:/etc/hosts:ro
      
# docker-compose  up -d
# docker-compose  ps
    Name                   Command               State   Ports
--------------------------------------------------------------
minio_minio_1   sh -euc mkdir -p /data1 && ...   Up
# docker logs -f minio_minio_1
WARNING: MINIO_ACCESS_KEY and MINIO_SECRET_KEY are deprecated.
         Please use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD
WARNING: Detected Linux kernel version older than 4.0.0 release, there are some known potential performance problems with this kernel version. MinIO recommends a minimum of 4.x.x linux kernel version for best performance
Waiting for all MinIO sub-systems to be initialized.. lock acquired
Automatically configured API requests per node based on available memory on the system: 216
All MinIO sub-systems initialized successfully in 168.003057ms
MinIO Object Storage Server
Copyright: 2015-2022 MinIO, Inc.
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Version: RELEASE.2022-12-12T19-27-27Z (go1.19.4 linux/amd64)

Status:         6 Online, 0 Offline.
API: http://10.20.138.54:9000
Console: http://10.20.138.54:36709 http://172.17.0.1:36709 http://127.0.0.1:36709

Documentation: https://min.io/docs/minio/linux/index.html
10.20.138.53
# mkdir -p /apps/minio
# mkdir -p /data/minio/{data1,data2}
# cd /apps/minio/
# vi  docker-compose.yaml
version: "3"
services:
  minio:
    image: minio/minio
    network_mode: "host"
    restart: always
    entrypoint:
      - sh
      - -euc
      - |
        mkdir -p /data1 && \
        mkdir -p /data2 &&
        minio server --address 10.20.138.53:9000 http://minio-{1...3}/data{1...2}
    environment:
      - MINIO_ACCESS_KEY=admin
      - MINIO_SECRET_KEY=xx
      - MINIO_PROMETHEUS_AUTH_TYPE=public
      - MINIO_UPDATE=off
    #ports:
    #  - "9000:9000"
    volumes:
      - /data/minio/data1:/data1
      - /data/minio/data2:/data2
      - /etc/hosts:/etc/hosts:ro
  
# docker-compose  up -d
# docker-compose  ps
    Name                   Command               State   Ports
--------------------------------------------------------------
minio_minio_1   sh -euc mkdir -p /data1 && ...   Up
# docker logs -f minio_minio_1
WARNING: MINIO_ACCESS_KEY and MINIO_SECRET_KEY are deprecated.
         Please use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD
WARNING: Detected Linux kernel version older than 4.0.0 release, there are some known potential performance problems with this kernel version. MinIO recommends a minimum of 4.x.x linux kernel version for best performance
Waiting for all MinIO sub-systems to be initialized.. lock acquired
Automatically configured API requests per node based on available memory on the system: 216
All MinIO sub-systems initialized successfully in 168.003057ms
MinIO Object Storage Server
Copyright: 2015-2022 MinIO, Inc.
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Version: RELEASE.2022-12-12T19-27-27Z (go1.19.4 linux/amd64)

Status:         6 Online, 0 Offline.
API: http://10.20.138.54:9000
Console: http://10.20.138.54:36709 http://172.17.0.1:36709 http://127.0.0.1:36709

Documentation: https://min.io/docs/minio/linux/index.html
10.20.138.54
# mkdir -p /apps/minio
# mkdir -p /data/minio/{data1,data2}
# cd /apps/minio/
# vi  docker-compose.yaml
version: "3"
services:
  minio:
    image: minio/minio
    network_mode: "host"
    restart: always
    entrypoint:
      - sh
      - -euc
      - |
        mkdir -p /data1 && \
        mkdir -p /data2 &&
        minio server --address 10.20.138.54:9000 http://minio-{1...3}/data{1...2}
    environment:
      - MINIO_ACCESS_KEY=admin
      - MINIO_SECRET_KEY=xx
      - MINIO_PROMETHEUS_AUTH_TYPE=public
      - MINIO_UPDATE=off
    #ports:
    #  - "9000:9000"
    volumes:
      - /data/minio/data1:/data1
      - /data/minio/data2:/data2
      - /etc/hosts:/etc/hosts:ro
      
# docker-compose  up -d
# docker-compose  ps
    Name                   Command               State   Ports
--------------------------------------------------------------
minio_minio_1   sh -euc mkdir -p /data1 && ...   Up

# docker logs -f minio_minio_1
WARNING: MINIO_ACCESS_KEY and MINIO_SECRET_KEY are deprecated.
         Please use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD
WARNING: Detected Linux kernel version older than 4.0.0 release, there are some known potential performance problems with this kernel version. MinIO recommends a minimum of 4.x.x linux kernel version for best performance
Waiting for all MinIO sub-systems to be initialized.. lock acquired
Automatically configured API requests per node based on available memory on the system: 216
All MinIO sub-systems initialized successfully in 168.003057ms
MinIO Object Storage Server
Copyright: 2015-2022 MinIO, Inc.
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Version: RELEASE.2022-12-12T19-27-27Z (go1.19.4 linux/amd64)

Status:         6 Online, 0 Offline.
API: http://10.20.138.54:9000
Console: http://10.20.138.54:36709 http://172.17.0.1:36709 http://127.0.0.1:36709

Documentation: https://min.io/docs/minio/linux/index.html

5、访问任意节点的9000端口测试

输入:账户:admin / 密码:xx

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-KEG8b7B6-1671692827600)(/Users/xushuo/Library/Application Support/typora-user-images/image-20221222150510240.png)]

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值