MinIO在CentOS上的網絡配置主要涉及端口、IP綁定及防火墻設置,具體如下:
端口配置
9000(服務端)和9001(控制臺),可通過啟動參數或配置文件修改:# 命令行參數指定
minio server /data --address ":9000" --console-address ":9001"
或通過配置文件(如/etc/minio/config.json):{
"address": ":9000",
"console-address": ":9001"
}
IP綁定
"bind-address": "0.0.0.0"(默認值,無需額外配置)。eth0):需在啟動命令中指定--bind-address "eth0:9000",或通過配置文件設置。防火墻設置
sudo firewall-cmd --permanent --zone=public --add-port=9000/tcp
sudo firewall-cmd --permanent --zone=public --add-port=9001/tcp
sudo firewall-cmd --reload
可選配置
{
"enable-https": true,
"cert-file": "/path/to/cert.pem",
"key-file": "/path/to/key.pem"
}
--console-address指定控制臺端口(默認9001),需確保防火墻放行。配置完成后,可通過http://服務器IP:9001訪問MinIO控制臺驗證網絡連通性。