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文章来源:https://www.toymoban.com/news/detail-409373.html
文章来源地址https://www.toymoban.com/news/detail-409373.html
到了这里,关于docker安装minio集群的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!