admin avatar

开源对象存储MinIO的搭建安装配置记录

🕑 by admin

MinIO

MinIO是在Apache License v2下发布的与Amazon S3兼容的云存储服务器。作为对象存储,MinIO可以存储非结构化数据,例如照片,视频,日志文件,备份和容器映像。对象的最大大小为5TB

MinIO支持商业订阅,类似于红帽系统的商业模式,不过MinIO提供免费的使用套餐。。。

下面是MinIO的安装和配置教程,不详说了,自行看代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

wget https://dl.minio.io/server/minio/release/linux-amd64/minio
chmod +x minio
mv minio /usr/local/bin
mkdir -p /data/demo
minio server /data/demo   //后面是指定数据存放目录

chown nobody:nogroup /usr/local/bin/minio 
chmod +x /usr/local/bin/minio
chown nobody:nogroup /data/demo  //指定用户及赋予用户权限


//创建MinIO配置文件

vi /etc/default/minio

# Volume to be used for Minio server.
MINIO_VOLUMES="/data/demo/"  
# Use if you want to run Minio on a custom port.
MINIO_OPTS="--address :9000"
MINIO_ACCESS_KEY=demoadmin   //自行生成,最好大于18位数
# Secret key of the server.
MINIO_SECRET_KEY=demoadin 
创建开机启动MinIO

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
35
36
37
38
39

[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=nobody
Group=nogroup 
 
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

开机启动MinIO,已经MinIO运行状态查看

1
2
3
4
5
6
7

systemctl enable minio.service   
systemctl daemon-reload
systemctl start minio
systemctl status minio.service
systemctl stop minio

搞定

💘 相关文章

写一条评论