0
点赞
收藏
分享

微信扫一扫

Linux 安装 MinIO (CentOS 7) 记录 (阿里云)

码农K 2022-02-08 阅读 176

文章目录


MinIO 安装记录

1. 查看系统指令集架构并获取 MinIO 下载 URL

  • arch
    在这里插入图片描述

  • 获取 MinIO 下载 URL

    • 访问:https://docs.min.io/
      在这里插入图片描述
    • 由于为 x86_64 架构,因此 MinIO 下载对应的 URL 为:https://dl.min.io/server/minio/release/linux-amd64/minio
    • 在 shell 输入 wget 命令下载 MinIO:
wget https://dl.min.io/server/minio/release/linux-amd64/minio

在这里插入图片描述
   下载比较慢。下面这个下载有点问题:
在这里插入图片描述
就让它慢慢下吧!!!

2. MinIO 安装与启动

  • 创建并移动 minio 文件到安装目录:/usr/local/minio
    在这里插入图片描述

  • 添加可执行权限:chmod +x minio
    在这里插入图片描述

  • 查看 MINIO 帮助:./minio --help
    在这里插入图片描述

  • 查看 MINIO 版本:
    在这里插入图片描述

  • 配置 MINIO 的 用户名 & 密码

# 
export MINIO_ROOT_USER=admin
export MINIO_ROOT_PASSWORD=password
# 旧版本
# export MINIO_ACCESS_KEY=admin
# export MINIO_SECRET_KEY=password
  • MINIO server 命令帮助文档:
NAME:
  minio server - start object storage server

USAGE:
  minio server [FLAGS] DIR1 [DIR2..]
  minio server [FLAGS] DIR{1...64}
  minio server [FLAGS] DIR{1...64} DIR{65...128}

DIR:
  DIR points to a directory on a filesystem. When you want to combine
  multiple drives into a single large system, pass one directory per
  filesystem separated by space. You may also use a '...' convention
  to abbreviate the directory arguments. Remote directories in a
  distributed setup are encoded as HTTP(s) URIs.

# DIR 指向文件系统的一个目录。当你想要组合多个 Drive 到某个独立的大型的系统时,每个文件系统传递一个由空格分隔的目录即可。

FLAGS:
  --address value              bind to a specific ADDRESS:PORT, ADDRESS can be an IP or hostname (default: ":9000") [$MINIO_ADDRESS]
  --listeners value            bind N number of listeners per ADDRESS:PORT (default: 1) [$MINIO_LISTENERS]
  --console-address value      bind to a specific ADDRESS:PORT for embedded Console UI, ADDRESS can be an IP or hostname [$MINIO_CONSOLE_ADDRESS]
  --certs-dir value, -S value  path to certs directory (default: "/root/.minio/certs")
  --quiet                      disable startup information
  --anonymous                  hide sensitive information from logging
  --json                       output server logs and startup information in json format
  --help, -h                   show help
  
EXAMPLES:
  1. Start minio server on "/home/shared" directory.
     $ minio server /home/shared

  2. Start single node server with 64 local drives "/mnt/data1" to "/mnt/data64".
     $ minio server /mnt/data{1...64}

  3. Start distributed minio server on an 32 node setup with 32 drives each, run following command on all the nodes
     $ export MINIO_ROOT_USER=minio
     $ export MINIO_ROOT_PASSWORD=miniostorage
     $ minio server http://node{1...32}.example.com/mnt/export{1...32}

  4. Start distributed minio server in an expanded setup, run the following command on all the nodes
     $ export MINIO_ROOT_USER=minio
     $ export MINIO_ROOT_PASSWORD=miniostorage
     $ minio server http://node{1...16}.example.com/mnt/export{1...32} \
            http://node{17...64}.example.com/mnt/export{1...64}

  • 启动 MINIO 单节点服务器:./minio server ./data
  • 编写 shell 脚本启动 MINIO 单节点服务器
#!/bin/bash
console_address_port=2001
address_port=2002
if [ -n "$1" ]
then
        console_address_port=$1
        if [ -n "$2" ]
        then
                address_port=$2
        fi
fi
message=$(date "+%Y-%m-%d  %H:%M:%S")
echo ${message} >> info.log
/usr/local/minio/minio server --console-address ":${console_address_port}" --address=":${address_port}" /usr/local/minio/data >> /usr/local/minio/info.log 2> error.log &
echo "PID OF MINIO SERVER: $!"

在这里插入图片描述

  • 访问:
    在这里插入图片描述
举报

相关推荐

0 条评论