Centos离线部署之Minio

1、创建minio文件夹,以及后续储存数据和日志文件夹

shell 复制代码
# 创建minio文件夹
mkdir -p /data/minio
# 存储数据目录
mkdir -p /data/minio/data
# 存储日志目录
mkdir -p /data/minio/log
# 配置文件存储目录
mkdir -p /data/minio/conf
# 切换目录
cd /data/minio

2、下载minio二进制文件

dl.min.io/server/mini...

3、将下载的minio文件添加为可执行文件

shell 复制代码
chmod +x minio

4、创建配置文件

shell 复制代码
vim /data/minio/conf/minio.conf

脚本内容:

shell 复制代码
MINIO_VOLUMES="/data/minio/data"

MINIO_SERVER_LOG_DIR="/data/minio/logs"

MINIO_OPTS="-C /data/minio/conf --address 0.0.0.0:9000 --console-address 0.0.0.0:9001"

MINIO_ROOT_USER=admin

MINIO_ROOT_PASSWORD=adminminio

5、创建系统启动脚本

shell 复制代码
vim /etc/systemd/system/minio.service

脚本内容:

shell 复制代码
[Unit]

Description=Minio

Documentation=https://docs.min.io

Wants=network-online.target

After=network-online.target

[Service]

# User and group

User=root

Group=root

EnvironmentFile=/data/minio/conf/minio.conf

ExecStart=/data/minio/minio server $MINIO_OPTS 

ExecReload=/bin/kill -HUP $MAINPID

# Let systemd restart this service always

Restart=always

# Specifies the maximum file descriptor number that can be opened by this process

LimitNOFILE=65536

TimeoutStopSec=5

SendSIGKILL=no

SuccessExitStatus=0 1

StandardOutput=syslog

StandardError=syslog

SyslogIdentifier=minio

[Install]

WantedBy=multi-user.target

6、启动minio

shell 复制代码
# 启动

systemctl start minio

# 停止

systemctl stop minio

# 查看服务状态

systemctl status minio

# 重载服务脚本

systemctl daemon-reload

# 设置开机启动

systemctl enable minio
相关推荐
phenhorlin3 天前
我做了个工具,让切换 Homebrew 镜像像切 npm 源一样简单
后端·shell
qq_3750133316 天前
shell
shell
Strugglingler17 天前
基于whiptail开发shell导航工具
linux·shell·ui设计·whiptail
亚林瓜子18 天前
AWS Glue Python Shell中获取外网ip
python·tcp/ip·http·shell·aws·vpc·glue
爱凤的小光18 天前
GDB调试技巧与指令完全指南---个人学习篇
shell·gdb
亚林瓜子18 天前
AWS Glue Python Shell任务中pip安装依赖库
python·shell·pip·aws·glue·job
亚林瓜子18 天前
AWS Glue Python Shell任务中读取Athena数据库
数据库·python·shell·aws·glue·athena
SilentSamsara19 天前
Linux磁盘与存储管理:分区、LVM 与 IO 性能全栈分析
linux·运维·服务器·ssh·shell