Chinese documentation: http://docs.minio.org.cn/docs/
Simple installation, download and start
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服务的数据目录
1. Set Minio as a service
In the above steps, if Ctrl+C exits, the Minio service will also stop at the same time, so if you need it to serve in the background, you need to add it to the background service. (By default you are in root authority =-=, without sudo)
2. Add minio users and create a Minio folder
adduser minio-user
mkdir -p /data/minio
chown minio-user:minio-user /data/minio
3. Create a configuration file and update your Key value
vim /etc/default/minio
Copy the configuration below into the minio file
MINIO_ACCESS_KEY="minioAdmin"
MINIO_SECRET_KEY="minioAdmin"
MINIO_VOLUMES="/data/minio/"
MINIO_OPTS="--address :9000"
4. Create a new minio.service in /etc/systemd/system
vim /etc/systemd/system/minio.service
Copy the configuration below into the minio.service file
[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
5. Official launch and check status
systemctl enable minio.service
systemctl daemon-reload
systemctl start minio.service
systemctl status minio.service
systemctl stop minio.service