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
相关推荐
吴声子夜歌5 天前
Shell编程实例——编写安全的shell脚本(二)
linux·运维·shell
吴声子夜歌6 天前
Shell编程实例——内务及管理任务(一)
linux·运维·shell
吴声子夜歌6 天前
Shell编程实例——高级脚本编程(一)
linux·运维·网络·shell
吴声子夜歌6 天前
Shell编程实例——bash的配置与自定义(二)
linux·运维·shell
吴声子夜歌7 天前
Shell编程实例——与解析相关的任务(二)
linux·运维·shell
吴声子夜歌7 天前
Shell编程实例——脚本编程的附加特性
linux·运维·shell
云计算练习生7 天前
什么是内核?操作系统内核到底管哪些事
linux·windows·操作系统·内核·shell
吴声子夜歌10 天前
Shell编程实例——bash入门
linux·运维·shell
Swizard10 天前
Linux 日志神器 journalctl 完全指南:彻底替代传统日志查看方式
shell
吴声子夜歌11 天前
Shell编程——数组
linux·运维·shell