minio单节点搭建
sed -i 's/^nameserver.*/nameserver 223.5.5.5/g' /etc/resolv.conf
cat /etc/resolv.conf | grep "^nameserver" > /dev/null || echo "nameserver 223.5.5.5" > /etc/resolv.conf
yum install -y -q curl wget ntp ntpdate lrzsz telnet zip unzip net-tools
timedatectl set-timezone Asia/Shanghai
/usr/sbin/ntpdate -u ntp.aliyun.com
/usr/sbin/iptables -F
systemctl stop firewalld.service
systemctl disable firewalld.service
systemctl status firewalld.service
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
setenforce 0
mkdir -p /data/minio_9000/{data,logs}
curl -L http://iso.sqlfans.cn/linux/minio.2023-06-29 -o /data/minio_9000/minio
chmod +x /data/minio_9000/minio
cat >/data/minio_9000/start.sh<<EOF
#!/bin/bash
export MINIO_ROOT_USER=minioadmin
export MINIO_ROOT_PASSWORD=Admin_147
pid=\$(ps -ef | grep minio | grep -v grep | wc -l)
if [ \$pid -eq 1 ]; then ps -ef | grep minio | grep -v grep | awk '{print \$2}' | xargs kill -9 2> /dev/null; fi
nohup /data/minio_9000/minio server /data/minio_9000/data --console-address=":9100" > /data/minio_9000/logs/minio.log 2>&1 &
EOF
chmod +x /data/minio_9000/start.sh
cat /data/minio_9000/start.sh | awk 'BEGIN{ RS=" "; } { print $1 }' | grep http
- 4.启动minio(9000即刻监听,而9100待所有节点启动后才被监听)
sh /data/minio_9000/start.sh
netstat -lnpt | grep minio
cat /etc/rc.local | grep minio || echo "sh /data/minio_9000/start.sh" >> /etc/rc.local
- 6.登录 minio 页面控制台,示例
http://10.30.3.231:9100
地址:http://10.30.3.231:9100
账号:minioadmin
密码:Admin_147