当前位置:   article > 正文

docker安装minio集群_docker安装 minio 集群

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
  • 1
  • 2
  • 3
  • 4
  • 5

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
  • 1
  • 2
  • 3
  • 4

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
  • 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
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
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
  • 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
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
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
  • 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
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52

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

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

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/64908
推荐阅读
相关标签
  

闽ICP备14008679号