1.下载地址 MinIO | Code and downloads to create high performance object storage
2.创建文件相关文件夹 mkdir
3.赋权
chomd +x minio
4.创建用户组和租户
groupadd minio
###
useradd minio -g minio
### 验证
cat /etc/passwd
5.创建配置文件
vi minio.conf
MINIO_VOLUMES="/dat/minIO/data"
MINIO_OPTS="-C /dat/minIO/etc --console-address 100.1.4.21:9001"
MINIO_ACCESS_KEY="***"
MINIO_SECRET_KEY="***"
6.创建服务
vi /etc/systemd/system/minio.service
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/dat/minIO/bin/minio
[Service]
# User and group
User=minio
Group=minio
EnvironmentFile=/dat/minIO/etc/minio.conf
ExecStart=/dat//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
7.授权mino目录
chown minio.minio /dat/minIO -R
8.启动服务
### 服务加载
systemctl daemon-reload
### 开机启动
systemctl enable minio.service
### 停止开机启动
systemctl disable minio.service
### 启动
systemctl start minio.service
### 状态
systemctl status minio.service
### 停止
systemctl stop minio.service
9.Nginx代理(代理console-address)
### minio 代理配置
location /{
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_connect_timeout 300;
proxy_http_version 1.1;
proxy_set_header Connection "";
chunked_transfer_encoding off;
proxy_pass http://100.1.4.21:9001;
}