对象存储MinIO实践

https://min.io/

install minio

1
2
3
4
5
useradd -M -d /opt/minio -s /sbin/nologin -c "MinIO User" minio
mkdir /opt/minio/{bin,data/{drive1,drive2},certs}
curl -sL https://dl.min.io/server/minio/release/linux-amd64/minio -o /opt/minio/bin/minio
chown -R minio. /opt/minio
chmod a+x /opt/minio/bin/minio

/etc/default/minio

1
2
3
4
5
6
7
8
9
# Volume to be used for MinIO server.
MINIO_VOLUMES="http://10.10.253.16:19000/opt/minio/data/drive1 http://10.10.253.16:19000/opt/minio/data/drive2 http://10.10.253.17:19000/opt/minio/data/drive1 http://10.10.253.17:19000/opt/minio/data/drive2 http://10.10.253.18:19000/opt/minio/data/drive1 http://10.10.253.18:19000/opt/minio/data/drive2"
### Please provide an even number of endpoints greater or equal to 4
# Use if you want to run MinIO on a custom port.
MINIO_OPTS="--address :19000 --console-address :19001"
# Root user for the server.
MINIO_ROOT_USER=admin
# Root secret for the server.
MINIO_ROOT_PASSWORD=passw0rd

/etc/systemd/system

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
31
32
33
34
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/opt/minio/bin/minio

[Service]
WorkingDirectory=/opt/minio

User=minio
Group=minio

EnvironmentFile=-/etc/default/minio
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"
ExecStart=/opt/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

# Specifies the maximum number of threads this process can create
TasksMax=infinity

# Disable timeout logic and wait until process is stopped
TimeoutStopSec=infinity
SendSIGKILL=no

[Install]
WantedBy=multi-user.target

# Built for ${project.name}-${project.version} (${project.name})

MinIO Ops

systemctl start minio.service
journalctl -fu minio.service

Ref


对象存储MinIO实践
https://www.boer.xyz/2021/09/01/object-storage-of-minio/
作者
boer
发布于
2021年9月1日
许可协议