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
相关推荐
czhc114007566314 小时前
LINUX93 shell:sh -c ‘ ‘sh {}+
shell
误入运维泥潭3 天前
Shell脚本入门:从零到精通
shell·字符串处理·case语句
czhc11400756633 天前
Linux92 shell:倒计时,用户分类
shell
从零开始的ops生活3 天前
【Day 42】Shell-expect和sed
linux·运维·ssh·shell·expect
Johny_Zhao3 天前
达梦数据库高可用集群部署方案
linux·mysql·网络安全·docker·信息安全·kubernetes·云计算·shell·containerd·达梦数据库·yum源·系统运维·centos8
挖稀泥的工人3 天前
如何在Eletron中打开window的powershell
前端·electron·shell
sunny052968 天前
Linux shell getopts 解析命令行参数
linux·运维·bash·shell
Johny_Zhao10 天前
Conda、Anaconda、Miniconda对比分析
linux·网络安全·信息安全·kubernetes·云计算·conda·shell·containerd·anaconda·yum源·系统运维·miniconda
G_H_S_3_12 天前
【网络运维】Shell 脚本编程:while 循环与 until 循环
linux·运维·网络·shell
coderklaus12 天前
Shell 基础知识
linux·macos·shell