- 下载文件
参照 minio/minio: Multi-Cloud Object Storage (github.com) 中的readme可以找到一下x86的二进制文件下载地址:
https://dl.min.io/server/minio/release/linux-amd64/minio
- 新建执行用户,新建文件夹
新建用户 sudo useradd -r minio-user -s /sbin/nologin
在 /usr/local 文件夹下新建文件夹 minio
将文件夹的权限所有权转移给minio-user sudo chown minio-user:minio-user /usr/local/bin/minio
新建文件夹 minio/bin minio/etc minio/data
上传minio二进制文件到 minio/bin 文件夹下,赋予执行权限 chmod +777 minio
测试执行,临时启动 ./minio server /usr/local/minio/data
默认密码用户为 minioadmin:minioadmin
正常启动则正常 ctrl+c 退出
- 新建配置文件
在 /usr/local/etc 下新建 minio.conf 文件
MINIO_VOLUMES="/usr/local/minio/data"
MINIO_OPTS="--address :9000"
MINIO_ACCESS_KEY="minio"
MINIO_SECRET_KEY="12345678"
服务配置,使用系统守护线程 vim /etc/systemd/system/minio.service
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/minio/bin/minio
[Service]
# User and group
User=minio-user
Group=minio-user
EnvironmentFile=/usr/local/minio/etc/minio.conf
ExecStart=/usr/local/minio/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=65536
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=infinity
SendSIGKILL=no
[Install]
WantedBy=multi-user.target
- 设置启动方式
启动服务
systemctl start minio.service
设置为开机启动
systemctl enable minio.service
查看状态
systemctl status minio.service
关闭服务
systemctl stop minio
重新加载配置
systemctl daemon-reload
- 验证
访问minio
http://ip+:9000