minio version RELEASE.2022-09-01T23-53-36Z
minio二进制文件下载链接:https://pan.baidu.com/s/1CN-AZPYnPlw8VGjSp8qJ7w
提取码:1012
将下载好的minio二进制文件传到服务器的/opt目录下
配置minio集群的hosts(只要修改ip1到ip4):
vi /etc/hosts
ip1 minio01
ip2 minio02
ip3 minio03
ip4 minio04
配置minio启动文件:
mkdir -p /data/minio/{run,data}
mkdir /etc/minio
mv /opt/minio /data/minio/run/
cd /data/minio/run
vi run.sh
#!/bin/bash
export MINIO_ROOT_USER=minio
export MINIO_ROOT_PASSWORD=minio1234
export MINIO_PROMETHEUS_AUTH_TYPE=public
/data/minio/run/minio server --config-dir /etc/minio --console-address ":9001" \
http://minio0{1...4}:9000/data/minio/data
chmod +x /data/minio/run/*
配置minio.service:
vi /usr/lib/systemd/system/minio.service
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/data/minio/run/minio
[Service]
WorkingDirectory=/data/minio/data
User=root
Group=root
ProtectProc=invisible
ExecStart=/data/minio/run/run.sh
# Let systemd restart this service always
Restart=on-failure
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=1048576
# 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})
设置防火墙白名单(如果启用了防火墙):
firewall-cmd --add-port 9000/tcp --permanent
firewall-cmd --add-port 9001/tcp --permanent
firewall-cmd --reload
systemctl daemon-reload 重新加载服务的配置文件
systemctl start minio 启动MinIO
systemctl enable minio 开机自启MinIO
systemctl status minio 查看MinIO状态
systemctl stop minio 关闭MinIO
systemctl disable minio.service 关闭MinIO每次开机启动
登录minio控制台:http://任一集群节点IP:9001