/**
* minio集群安装
* @author wx-yuzhili
* @date 2021-9-30
* @access localhost:8085/minio/
* @accessKey
*/
服务器:
worker-03 192.168.100.3:9001
master-07 192.168.100.7:9001
master-11 192.168.100.11:9001
123 192.168.100.13:9001
master-14 192.168.100.14:9001
wxcloud 192.168.100.15:9001
每台服务器都执行:
mkdir /minio/sharedata/
mkdir /opt/minio/;cd /opt/minio/
wget https://dl.minio.io/server/minio/release/linux-amd64/minio
在某一台服务器上,编写run.sh脚本
root@123:/opt/minio# cat run.sh
#!/bin/bash
#mkdir -p /etc/minio/
export MINIO_ACCESS_KEY=Wxminio
export MINIO_SECRET_KEY=Wx1234567
/opt/minio/minio server --address '0.0.0.0:9002' --console-address '0.0.0.0:9001' --config-dir /etc/minio http://192.168.100.3/minio/sharedata http://192.168.100.13/minio/sharedata http://192.168.100.7/minio/sharedata http://192.168.100.11/minio/sharedata
在某一台服务器上,编写minio.service配置
root@123:/opt/minio# cat minio.service
[Unit]
Description=Minio service
Documentation=https://docs.minio.io/
[Service]
WorkingDirectory=/opt/minio/
ExecStart=/opt/minio/run.sh
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
将run.sh minio.service拷贝到其他服务器上
scp run.sh minio.service root@192.168.100.13:/opt/minio/
scp run.sh minio.service root@192.168.100.14:/opt/minio/
scp run.sh minio.service root@192.168.100.15:/opt/minio/
scp run.sh minio.service root@192.168.100.11:/opt/minio/
scp run.sh minio.service root@192.168.100.7:/opt/minio/
scp run.sh minio.service root@192.168.100.3:/opt/minio/
所有服务器都执行
cd /opt/minio/
chmod +x *
cp minio.service /lib/systemd/system/
systemctl stop minio
systemctl daemon-reload
systemctl start minio
systemctl enable minio
systemctl status minio.service
部署完成,打开浏览器:http://192.168.100.11:9001,使用初始化用户密码登录即可。
本文暂时没有评论,来添加一个吧(●'◡'●)