在CentOS上部署MinIO对象存储服务的步骤如下:
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
sudo mkdir -p /data
sudo chown $(whoami):$(whoami) /data
./minio server /data --console-address ":9001"
--console-address ":9001" 启用MinIO Web控制台,端口为9001。sudo firewall-cmd --permanent --zone=public --add-port=9001/tcp
sudo firewall-cmd --reload
http://<服务器IP>:9001 即可访问MinIO Web控制台。wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo mv mc /usr/local/bin/
./mc alias set myminio http://<服务器IP地址>:9001 ACCESS_KEY SECRET_KEY
ACCESS_KEY 和 SECRET_KEY 替换为您的实际值。./mc mb myminio/mybucket
./mc ls myminio
./mc cp /path/to/your/file myminio/mybucket/
./mc cp myminio/mybucket/yourfile /path/to/download/location
sudo nano /etc/systemd/system/minio.service
粘贴以下内容(修改用户名、路径和密码):
[Unit]
Description=MinIO Object Storage
After=network.target
[Service]
User=root
Group=root
ExecStart=/usr/local/bin/minio server /data --console-address ":9001"
Environment="MINIO_ROOT_USER=minioadmin"
Environment="MINIO_ROOT_PASSWORD=minioadmin"
Restart=always
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now minio
sudo systemctl status minio
以上步骤完成后,您就成功地在CentOS服务器上部署并配置了MinIO对象存储服务。您可以通过MinIO Web控制台或 mc 客户端来管理您的数据。