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
相关推荐
stella·11 小时前
服务器割接,我所学习到的内容。
linux·运维·服务器·学习·shell·割接
柏木乃一1 天前
进程(7)命令行参数与环境变量
linux·服务器·shell·环境变量·鸣潮
Neolnfra1 天前
Shell攻防完全手册:从反弹到后渗透
渗透·shell·反弹shell
gis分享者3 天前
Bash 中如何使用正则表达式进行文本处理?(中等)
正则表达式·bash·shell·文本·处理
gis分享者4 天前
请编写一个 Bash 脚本检查系统中的所有服务状态(中等)
bash·shell·服务·状态·检查·所有
_OP_CHEN4 天前
【Linux系统编程】(十七)揭秘 Linux 进程创建与终止:从 fork 到 exit 的底层逻辑全解析
linux·运维·服务器·操作系统·shell·进程·进程创建与终止
pr_note5 天前
via ladder
shell·tcl
import_random8 天前
[macos系统]我用的是苹果电脑, 终端的shell是zsh,而不是bash, 那我在执行.sh文件的时候, 是bash xxx.sh还是zsh xxx.sh
shell
gis分享者8 天前
如何在 Shell 脚本中如何使用条件判断语句?(中等)
面试·shell·脚本·语法·使用·判断·条件
zfj3219 天前
sshd除了远程shell外还有哪些功能
linux·ssh·sftp·shell