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控制台验证网络连通性。