2 minio安装教程
注:官方中文文档:MinIO对象存储 Windows — MinIO中文文档 | MinIO Windows中文文档
Liunx 安装方:MinIO对象存储 Linux — MinIO中文文档 | MinIO Linux中文文档
2.1 下载地址
https://dl.min.io/server/minio/release/windows-amd64/minio.exe
2.2 运行命令
minio.exe server d:\minio\file --console-address :9090
————————————————
MinIO-rpm离线安装_linux安装minio rpm-CSDN博客
此案例以Liunx安装为例
1 在/data目录下,建立minio目录,如图所示
2 将路径切换到/data/minio目录下,执行如下命令,下载minio安装包
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio-20240315010719.0.0-1.x86_64.rpm -O minio.rpm
3 安装minio服务器,在minio.rpm的目录下执行此命令
rpm -ivh minio.rpm
4 设置minio的启动用户,编辑minio的启动文件(启动时执行程序的用户)
vim /usr/lib/systemd/system/minio.service
将User和Group都指定为root
4.1 新版本的minio这里TimeoutSec参数名称错了,将 TimeoutSec 修改为 TimeoutStopSec,否则启动报错,如下所示。
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio[Service]
Type=notifyWorkingDirectory=/usr/localUser=minio-user
Group=minio-user
ProtectProc=invisibleEnvironmentFile=-/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# Let systemd restart this service always
Restart=always# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=1048576# Turn-off memory accounting by systemd, which is buggy.
MemoryAccounting=no# Specifies the maximum number of threads this process can create
TasksMax=infinity# Disable timeout logic and wait until process is stopped
TimeoutSec=infinitySendSIGKILL=no[Install]
WantedBy=multi-user.target# Built for ${project.name}-${project.version} (${project.name})
4.2 编辑完成后复制到/etc/systemd/system/,执行如下命令
cp /usr/lib/systemd/system/minio.service /etc/systemd/system/
4.3 重新加载配置文件
systemctl daemon-reload
5 查找minio的位置,显示文件的路径
which minio
6. 切换目录下
cd /usr/local/bin
8 启动minio, server 后面跟的是文件存放的路径
注: 文件存放的地址:/data/minio/file
./minio server /data/minio/file --console-address "0.0.0.0:9001"
9 打开浏览器,输入 http://ip:9001/login 可以访问了
查看minio的进程状态
ps aux | grep minio
查看端口的使用状态
netstat -an|grep 9001
MINIO设定自动启动功能
1. 创建minio启动配置文件(注启动minio的配置文件),执行如下命令
vim /etc/default/minio
#添加配置参数, 注意 MINIO_OPTS选项中两个冒号前面均有空格
MINIO_VOLUMES="/data/minio/file"
MINIO_OPTS="--address :9000 --console-address :9001"
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
输入启动配置参数后,保存并退出的命令是 :wq
或者使用快捷键 ZZ
(大写)
2 启动minio,执行如下命令
systemctl start minio
3 设置开机自启动
systemctl enable minio
提示如下信息:
Created symlink from /etc/systemd/system/multi-user.target.wants/minio.service to /etc/systemd/system/minio.service.
4 查看状态
systemctl status minio