栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

minio分布式安装

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

minio分布式安装

分布式分布

四台服务器,每台服务器三个磁盘,每台服务器的配置一致

下载minio二进制文件
#创建minio目录
mkdir /opt/module/minio
#进入minio目录
cd /opt/module/minio
#下载minio
wget https://dl.minio.io/server/minio/release/linux-amd64/minio
#增加权限
chmod +x minio
#移动至/usr/local/bin
mv minio /usr/local/bin/
创建环境配置文件
#vim /etc/default/minio

# 服务器与磁盘也可以以这种形式 `minio server http://host{1...32}/export{1...32}`
MINIO_VOLUMES=http://192.168.0.51/home/minio/data1 
http://192.168.0.51/home/minio/data2 
http://192.168.0.51/home/minio/data3 
http://192.168.0.51/home/minio/data4 
http://192.168.0.52/home/minio/data1 
http://192.168.0.52/home/minio/data2 
http://192.168.0.52/home/minio/data3 
http://192.168.0.52/home/minio/data4 
http://192.168.0.53/home/minio/data1 
http://192.168.0.53/home/minio/data2 
http://192.168.0.53/home/minio/data3 
http://192.168.0.53/home/minio/data4 
http://192.168.0.54/home/minio/data1 
http://192.168.0.54/home/minio/data2 
http://192.168.0.54/home/minio/data3 
http://192.168.0.54/home/minio/data4 

# 前者是访问端口  后者是web端口
MINIO_OPTS="--address :9199 --console-address :39199"

# 用户名
MINIO_ACCESS_KEY=minioAdmin

# 密码
MINIO_SECRET_KEY=minioPasswd
配置minio.service服务
#进入/etc/systemd/system/
cd /etc/systemd/system/
#创建文件minio.service(或者 `curl -O https://raw.githubusercontent.com/minio/minio-service/master/linux-systemd/distributed/minio.service` 再修改User与Group也可)
vim minio.service

[Unit]
Description=MinIO
documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio

[Service]
WorkingDirectory=/home

User=root
Group=root
ProtectProc=invisible

EnvironmentFile=-/etc/default/minio
ExecStartPre=/bin/bash -c "if [ -z "${MINIO_VOLUMES}" ]; then echo "Variable MINIO_VOLUMES not set in /etc/default/minio"; exit 1; fi"
ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES

# Let systemd restart this service always
Restart=always

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536

# Specifies the maximum number of threads this process can create
TasksMax=infinity

# Disable timeout logic and wait until process is stopped
TimeoutStopSec=infinity
SendSIGKILL=no

[Install]
WantedBy=multi-user.target

# Built for ${project.name}-${project.version} (${project.name})
启动服务
#开机启动
systemctl enable minio.service
#启动服务
systemctl start minio.service
#查看服务
systemctl status minio.service
访问
#MINIO_OPTS="--address :9199 --console-address :39199" 这个参数里的端口
ip:9199
# 用户名 也是上面配置的
MINIO_ACCESS_KEY=minioAdmin

# 密码 上面配置的
MINIO_SECRET_KEY=minioPasswd

登陆效果图

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/345857.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号