1.指定控制台端口号
./minio server --console-address 0.0.0.0:30080 /www/minio/data
2.单台服务器分布式部署
export MINIO_ACCESS_KEY=minioadmin
export MINIO_SECRET_KEY=minioadmin
minio server http://192.168.1.11/export1 http://192.168.1.12/export2 \
http://192.168.1.13/export3 http://192.168.1.14/export4 \
http://192.168.1.15/export5 http://192.168.1.16/export6 \
http://192.168.1.17/export7 http://192.168.1.18/export8
- 单节点多磁盘
./minio server \
--console-address 0.0.0.0:30080 \
--address 0.0.0.0:40080 \
/www/minio/data1 \
/www/minio/data2 \
/www/minio/data3 \
/www/minio/data4
- 多节点多磁盘
30081服务,api40081
nohup /www/minio/minio server --address 127.0.0.1:40081 --console-address 127.0.0.1:30081 http://127.0.0.1:40081/www/minio/data5 http://127.0.0.1:40081/www/minio/data6 http://127.0.0.1:40082/www/minio/data7 http://127.0.0.1:40082/www/minio/data8 > /minio-40081.log 2>&1 &
30082服务,api40082
nohup /www/minio/minio server --address 127.0.0.1:40082 --console-address 127.0.0.1:30082 http://127.0.0.1:40081/www/minio/data5 http://127.0.0.1:40081/www/minio/data6 http://127.0.0.1:40082/www/minio/data7 http://127.0.0.1:40082/www/minio/data8 > /minio-40082.log 2>&1 &
- 服务器可扩容脚本
RUNNING_USER=minio
MINIO_HOME=/www/minio
MINIO_HOST=127.0.0.1
#accesskey and secretkey
ACCESS_KEY=minioadmin
SECRET_KEY=minioadmin
for i in {1..2}; do
START_CMD="MINIO_ACCESS_KEY=${ACCESS_KEY} MINIO_SECRET_KEY=${SECRET_KEY} nohup ${MINIO_HOME}/minio server --address "${MINIO_HOST}:4008${i}" --console-address "${MINIO_HOST}:3008${i}" http://${MINIO_HOST}:40081/www/minio/data5 http://${MINIO_HOST}:40081/www/minio/data6 http://${MINIO_HOST}:40082/www/minio/data7 http://${MINIO_HOST}:40082/www/minio/data8 > ${MINIO_HOME}/minio-3008${i}.log 2>&1 &"
su - ${RUNNING_USER} -c "${START_CMD}"
done
2.多台服务器分布式部署
3.分布式Nginx配置
upstream http_minio {
server 127.0.0.1:30081;
server 127.0.0.1:30082;
}
server{
listen 30080;
server_name 127.0.0.1;
ignore_invalid_headers off;
client_max_body_size 0;
proxy_buffering off;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header Host $http_host;
proxy_connect_timeout 300;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_ignore_client_abort on;
proxy_pass http://http_minio;
}
}
参考文档:
网友评论