MinIo安装起步
使用Dockers安装一个单节点多驱动的MiniIO服务
前置条件:
[root@localhost mnt]# df -h |grep /mnt
/dev/sdb1 25G 33M 25G 1% /mnt/minio1
/dev/sdb2 15G 33M 15G 1% /mnt/minio2
/dev/nvme0n1p1 20G 33M 20G 1% /mnt/minio3
/dev/nvme0n1p2 20G 33M 20G 1% /mnt/minio4
[root@localhost mnt]# docker -v
Docker version 23.0.1, build a5ee5b1
[root@localhost mnt]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/minio/minio latest c5442c4190b8 34 hours ago 254MB
安装
-
新建一个配置文件 /etc/default/minio
## 默认的管理员密码 MINIO_ROOT_USER=minioadmin MINIO_ROOT_PASSWORD=minioadmin ## 容器内minio的数据位置 MINIO_VOLUMES=/data/minio{1...4}
-
创建容器
docker run -dt -p 9000:9000 -p 9090:9090 -v /root/xys/minio/data1:/data/minio1 -v /root/xys/minio/data2:/data/minio2 -v /root/xys/minio/data3:/data/minio3 -v /root/xys/minio/data4:/data/minio4 -v /etc/default/minio:/etc/config.env -e "MINIO_CONFIG_ENV_FILE=/etc/config.env" --name "minio" quay.io/minio/minio server --console-address "192.168.21.130:9090" ## -p 9000:9000 -p 9090:9090 绑定端口,9000是API的端口,9090是后台网页的端口 ## -v /mnt/minio1:/data/minio{1-4} 容器卷数据 ## -e "MINIO_CONFIG_ENV_FILE=/etc/config.env" 环境变量 ## --console-address "192.168.21.130:9090" 端口要和前面的一致,IP是本机的IP,用于外部访问
-
问题
[root@localhost mnt]# docker logs minio 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 WARNING: Detected default credentials 'minioadmin:minioadmin', we recommend that you change these values with 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD' environment variables ... Documentation: https://min.io/docs/minio/linux/index.html ERROR Unable to initialize console server: listen tcp 192.168.21.130:9090: bind: cannot assign requested address ## 发布端口监听失败了,临时解决是把IP变为 0.0.0.0 监听所有IP --console-address "0.0.0.0:9090"
-
进入后台