简单安装下载启动
wget https://dl.minio.io/server/minio/release/linux-amd64/minio
chmod +x minio
mv minio /usr/local/bin
mkdir -p /data/minio
minio server /data/minio //后面的是数据目录
将Minio设置成服务
- 首先需要添加minio用户,以及建一个Minio文件夹
sudo useradd -r minio-user -s /sbin/nologin
mkdir -p /data/minio
chown minio-user:minio-user /data/minio
- 建立一个配置文件,并更新你的Key值
vim /etc/default/minio
MINIO_ACCESS_KEY="admin"
MINIO_SECRET_KEY="tykyadmin"
MINIO_VOLUMES="/data/minio/"
MINIO_OPTS="--address :9000"
- 新建一个minio.service 在 /etc/systemd/system
vim /etc/systemd/system/minio.service
[Unit]
Description=Minio
Documentation=https://docs.minio.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio
[Service]
WorkingDirectory=/usr/local/
User=minio-user
Group=minio-user
PermissionsStartOnly=true
EnvironmentFile=-/etc/default/minio
ExecStartPre=/bin/bash -c "[ -n \"${MINIO_VOLUMES}\" ] || echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\""
ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES
StandardOutput=journal
StandardError=inherit
# 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=0
# SIGTERM signal is used to stop Minio
KillSignal=SIGTERM
SendSIGKILL=no
SuccessExitStatus=0
[Install]
WantedBy=multi-user.target
网友评论