Minio分布式文件系统
注意:192.168.118.35是我的虚拟机ip,使用的时候记得改成自己的
拉取minio镜像
docker pull minio/minio
系统环境基本配置
cat >> /etc/sysctl.conf <<-'EOF'
net.ipv4.ip_forward=1
vm.max_map_count=655360
EOF
# 配置完成后要重新加载
sysctl -p
构建出macvlan的网络模式
docker network create -d macvlan \
--subnet=192.168.118.0/24 \
--ip-range=192.168.118.0/24 \
--gateway=192.168.118.1 \
-o parent=ens33 \
macvlan31
创建容器
第一个节点
docker run -d --name minio-240 \
--restart=always \
--network macvlan31 --ip=192.168.118.240 \
-v /data/n240/export1:/export1 \
-v /data/n240/export2:/export2 \
-e "MINIO_ROOT_USER=admin" \
-e "MINIO_ROOT_PASSWORD=a1b2c3d4" \
minio/minio server http://192.168.118.24{0...2}/export{1...2}
第二个节点
docker run -d --name minio-241 \
--restart=always \
--network macvlan31 --ip=192.168.118.241 \
-v /data/n241/export1:/export1 \
-v /data/n241/export2:/export2 \
-e "MINIO_ROOT_USER=admin" \
-e "MINIO_ROOT_PASSWORD=a1b2c3d4" \
minio/minio server http://192.168.118.24{0...2}/export{1...2}
第三个节点
docker run -d --name minio-242 \
--restart=always \
--network macvlan31 --ip=192.168.118.242 \
-v /data/n242/export1:/export1 \
-v /data/n242/export2:/export2 \
-e "MINIO_ROOT_USER=admin" \
-e "MINIO_ROOT_PASSWORD=a1b2c3d4" \
minio/minio server http://192.168.118.24{0...2}/export{1...2}
启动Minio
# 使用docker logs minio-240 查看面板 ip:端口
[root@localhost ~]# docker logs minio-240
Waiting for all MinIO sub-systems to be initialized.. lock acquired
Verifying if 1 bucket is consistent across drives...
Automatically configured API requests per node based on available memory on the system: 5
All MinIO sub-systems initialized successfully
Waiting for all MinIO IAM sub-system to be initialized.. lock acquired
Status: 6 Online, 0 Offline.
API: http://192.168.118.240:9000 http://127.0.0.1:9000
Console: http://192.168.118.240:46091 http://127.0.0.1:46091
Documentation: https://docs.min.io
WARNING: Console endpoint is listening on a dynamic port (46091), please use --console-address ":PORT" to choose a static port.
# http://192.168.118.240:9000在浏览器打开就可以看到面板了
# http://192.168.118.240:46091也可以
用户名密码在创建节点的时候指定了
标签:...,http,Minio,--,192.168,分布式文件系统,docker,minio From: https://www.cnblogs.com/yaobaia/p/17219730.html