centos7.9安装minio RELEASE.2025-04-22T22-12-26Z
说明:
之所以版本写这么详细,同之前的redis一样,minio厂家也再逐渐削减开源版的功能,以至如今传说不再更新,这个版本是功能完整的最后一个版本;现在也已经出现了很多开源替代产品,呼声比较高的还是一个国产的项目:rustfs,当前已经发布了1.0.0版本,可以考虑迁移
方法:
1.rpm包
版本应该是:minio-20250422221226.0.0-1.x86_64.rpm
2.二进制文件
使用国内镜像站下载
wget http://dl.minio.org.cn/server/minio/release/linux-amd64/archive/minio.RELEASE.2025-04-22T22-12-26Z
剩下步骤可参考官方文档
部署 MinIO:单节点单驱动器 - 用于 Linux 的 MinIO 对象存储 - MinIO 文档
简述一下步骤,以二进制文件为例:
1.将文件改名minio,授予执行权限,移动到系统执行目录
chmod +x minio
sudo mv minio /usr/local/bin/
2.创建数据保存目录,创建 专属用户,赋权
mkdir /mnt/data
groupadd -r minio-user
useradd -M -r -g minio-user minio-user
chown minio-user:minio-user /mnt/data
3.创建环境变量文件,设置用户名密码和端口等
sudo tee /etc/default/minio << EOF
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=your_strong_password
MINIO_VOLUMES="/mnt/data"
MINIO_OPTS="--address :9000 --console-address :9001"
EOF
# 注意:将 your_strong_password 替换为强密码(至少8个字符)
4.设置为systemd服务
[Unit] Description=MinIO Documentation=https://min-io.cn/docs/minio/linux/index.html Wants=network-online.target After=network-online.target AssertFileIsExecutable=/usr/local/bin/minio [Service] WorkingDirectory=/usr/local User=minio-user Group=minio-user ProtectProc=invisible EnvironmentFile=-/etc/default/minio ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi" ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES # MinIO RELEASE.2023-05-04T21-44-30Z adds support for Type=notify (https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=) # This may improve systemctl setups where other services use `After=minio.server` # Uncomment the line to enable the functionality # Type=notify # Let systemd restart this service always Restart=always # Specifies the maximum file descriptor number that can be opened by this process LimitNOFILE=65536 # Specifies the maximum number of threads this process can create TasksMax=infinity # Disable timeout logic and wait until process is stopped TimeoutStopSec=infinity SendSIGKILL=no [Install] WantedBy=multi-user.target # Built for ${project.name}-${project.version} (${project.name})
5.设置开机启动等
# 重新加载 systemd
sudo systemctl daemon-reload
# 启用开机自启
sudo systemctl enable minio
# 启动 MinIO 服务
sudo systemctl start minio
# 查看服务状态
sudo systemctl status minio
# 查看服务日志
sudo journalctl -u minio -f
6.设置防火墙
# 开放端口(如果需要) sudo firewall-cmd --zone=public --add-port=9000/tcp --permanent sudo firewall-cmd --zone=public --add-port=9001/tcp --permanent sudo firewall-cmd --reload

浙公网安备 33010602011771号