Linux(Centos)安装MInio

目录

  • 1:前期准备
  • 2:下载
  • 3:修改配置文件
  • 4:添加开机自启动
  • 5:启动
  • 6:验证开机自启(可选)
  • 7:验证
  • 8:常用命令
  • 9:目录介绍

1:前期准备

  • 创建安装目录
mkdir -p /usr/local/minio

2:下载

  • 进入安装目录
cd /usr/local/minio
  • 下载安装包
wget https://dl.minio.io/server/minio/release/linux-amd64/minio

在这里插入图片描述

3:修改配置文件

  • 创建数据存储文件夹
mkdir -p /usr/local/minio/data
  • 编辑配置文件
vim /etc/default/minio
  • 添加内容:用户名、密码、数据存储文件、程序链接端口、web界面访问端口
MINIO_ROOT_USER="minio"
MINIO_ROOT_PASSWORD="minio@123"
MINIO_VOLUMES=" /usr/local/minio/data"
MINIO_OPTS="--address 0.0.0.0:9000"
MINIO_OPTS1="--console-address 0.0.0.0:19001"

4:添加开机自启动

  • 编辑文件
vim /etc/systemd/system/minio.service
  • 添加内容
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/minio/minio

[Service]
WorkingDirectory=/usr/local/minio
ProtectProc=invisible

EnvironmentFile=/etc/default/minio
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"
ExecStart=/usr/local/minio/minio server --address 0.0.0.0:9000 $MINIO_OPTS  $MINIO_OPTS1 $MINIO_VOLUMES

# Let systemd restart this service always
Restart=always

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

# Specifies the maximum number of threads this process can create
TasksMax=infinity

# Disable timeout logic and wait until process is stopped
TimeoutStopSec=infinity
SendSIGKILL=no

[Install]
WantedBy=multi-user.target

5:启动

  • 启动服务
#加载配置
systemctl daemon-reload
#启动minio
systemctl start minio.service
#开启开机自启
systemctl enable minio.service

在这里插入图片描述

6:验证开机自启(可选)

reboot

7:验证

http://ip:19001/login

Linux(Centos)安装MInio_第1张图片

8:常用命令

systemctl start minio.service   #启动minio服务
systemctl stop minio.service   #停止minio服务
systemctl restart minio.service   #重新启动服务
systemctl status minio.service   #查看服务当前状态
systemctl enable minio.service   #设置开机自启动
systemctl disable minio.service   #停止开机自启动

9:目录介绍

安装目录:/usr/local/minio
数据保存目录:/usr/local/minio/data
配置文件目录:/etc/default/minio
启动配置文件存放目录:vim /etc/systemd/system/minio.service

你可能感兴趣的:(中间件,数据库,linux,centos,vim)