1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# 新建用户
sudo useradd -r minio-user -s /sbin/nologin
sudo chown -R minio-user:minio-user /usr/local/bin/minio
sudo mkdir /usr/local/share/minio
sudo chown -R minio-user:minio-user /usr/local/share/minio
sudo mkdir /etc/minio
sudo chown -R minio-user:minio-user /etc/minio
# 记得替换 MINIO_VOLUMES
cat /etc/default/minio
# Local export path.
MINIO_VOLUMES="/tmp/minio/"
# Use if you want to run Minio on a custom port.
MINIO_OPTS="--address :443"
EOT
# 替换key
cat /etc/default/minio
# Access Key of the server.
MINIO_ACCESS_KEY=Server-Access-Key
# Secret key of the server.
MINIO_SECRET_KEY=Server-Secret-Key
EOT
# 下载安装service文件
( cd /etc/systemd/system/; curl -O https://raw.githubusercontent.com/minio/minio-service/master/linux-systemd/minio.service )
# 记得替换 /etc/systemd/system/minio.service
# 中user和group
# 重载配置
systemctl daemon-reload
# 开机启动
systemctl enable minio.service
systemctl disable minio.service
|