首页 > 其他分享 >MinIO入门

MinIO入门

时间:2023-12-14 23:57:06浏览次数:43  
标签:minio mc object 入门 ms 9000 MinIO

MinIO 是一种高性能、S3 兼容的对象存储。

官方资料


安装MinIO服务器,执行如下命令。

mkdir -p ~/software/minio
cd ~/software/minio
mkdir -p data
mkdir -p config

wget https://dl.minio.org.cn/server/minio/release/linux-amd64/minio
chmod +x minio

启动MinIO服务,执行如下命令。

export MINIO_ROOT_USER=admin
export MINIO_ROOT_PASSWORD=admin1234
./minio server ~/software/minio/data \
    --console-address ":9001" \
    --config-dir ~/software/minio/config

控制台的输出,如下:

Formatting 1st pool, 1 set(s), 1 drives per set.
WARNING: Host local has more than 0 drives of set. A host failure will result in data becoming unavailable.
MinIO Object Storage Server
Copyright: 2015-2023 MinIO, Inc.
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Version: RELEASE.2023-11-20T22-40-07Z (go1.21.4 linux/amd64)

Status:         1 Online, 0 Offline.
S3-API: http://192.168.0.109:9000  http://127.0.0.1:9000
RootUser: admin
RootPass: admin1234

Console: http://192.168.0.109:9001 http://127.0.0.1:9001
RootUser: admin
RootPass: admin1234

Command-line: https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart
   $ mc alias set 'myminio' 'http://192.168.0.109:9000' 'admin' 'admin1234'

Documentation: https://min.io/docs/minio/linux/index.html
Warning: The standard parity is set to 0. This can lead to data loss.

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ You are running an older version of MinIO released 3 weeks before the latest release ┃
┃ Update: Run `mc admin update`                                                        ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

安装MinIO客户端,执行如下命令:

cd ~/software/minio
wget https://dl.minio.org.cn/client/mc/release/linux-amd64/mc
chmod +x mc

创建一个别名,执行如下命令:

./mc alias set 'myminio' 'http://192.168.0.109:9000' 'admin' 'admin1234'

控制台的输出,如下:

mc: Configuration written to `/home/jackie/.mc/config.json`. Please update your access credentials.
mc: Successfully created `/home/jackie/.mc/share`.
mc: Initialized share uploads `/home/jackie/.mc/share/uploads.json` file.
mc: Initialized share downloads `/home/jackie/.mc/share/downloads.json` file.
Added `myminio` successfully.

查看mc的帮助,执行如下命令:

./mc -help

控制台的输出,如下:

NAME:
  mc - MinIO Client for object storage and filesystems.

USAGE:
  mc [FLAGS] COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...]

COMMANDS:
  alias      manage server credentials in configuration file
  ls         list buckets and objects
  mb         make a bucket
  rb         remove a bucket
  cp         copy objects
  mv         move objects
  rm         remove object(s)
  mirror     synchronize object(s) to a remote site
  cat        display object contents
  head       display first 'n' lines of an object
  pipe       stream STDIN to an object
  find       search for objects
  sql        run sql queries on objects
  stat       show object metadata
  tree       list buckets and objects in a tree format
  du         summarize disk usage recursively
  retention  set retention for object(s)
  legalhold  manage legal hold for object(s)
  support    support related commands
  license    license related commands
  share      generate URL for temporary access to an object
  version    manage bucket versioning
  ilm        manage bucket lifecycle
  quota      manage bucket quota
  encrypt    manage bucket encryption config
  event      manage object notifications
  watch      listen for object notification events
  undo       undo PUT/DELETE operations
  anonymous  manage anonymous access to buckets and objects
  tag        manage tags for bucket and object(s)
  diff       list differences in object name, size, and date between two buckets
  replicate  configure server side bucket replication
  admin      manage MinIO servers
  idp        manage MinIO IDentity Provider server configuration
  update     update mc to latest release
  ready      checks if the cluster is ready or not
  ping       perform liveness check
  od         measure single stream upload and download
  batch      manage batch jobs

GLOBAL FLAGS:
  --autocompletion              install auto-completion for your shell
  --config-dir value, -C value  path to configuration folder (default: "/home/jackie/.mc") [$MC_CONFIG_DIR]
  --quiet, -q                   disable progress bar display [$MC_QUIET]

检查MinIO服务,执行如下命令:

./mc ping myminio

控制台的输出,如下:

  1: http://192.168.0.109:9000:9000   min=1.55ms     max=1.55ms     average=1.55ms     errors=0   roundtrip=1.55ms
  2: http://192.168.0.109:9000:9000   min=0.73ms     max=1.55ms     average=1.14ms     errors=0   roundtrip=0.73ms
  3: http://192.168.0.109:9000:9000   min=0.39ms     max=1.55ms     average=0.89ms     errors=0   roundtrip=0.39ms
  4: http://192.168.0.109:9000:9000   min=0.39ms     max=1.55ms     average=0.83ms     errors=0   roundtrip=0.65ms
  5: http://192.168.0.109:9000:9000   min=0.39ms     max=1.55ms     average=0.78ms     errors=0   roundtrip=0.60ms
  6: http://192.168.0.109:9000:9000   min=0.39ms     max=1.55ms     average=0.75ms     errors=0   roundtrip=0.62ms

检查别名的配置,执行如下命令:

./mc admin info myminio

控制台的输出,如下:

●  192.168.0.109:9000
   Uptime: 2 minutes
   Version: 2023-11-20T22:40:07Z
   Network: 1/1 OK
   Drives: 1/1 OK
   Pool: 1

Pools:
   1st, Erasure sets: 1, Drives per erasure set: 1

1 drive online, 0 drives offline

创建一个桶,执行命令如下:

./mc mb myminio/bkt1

控制台的输出,如下:

Bucket created successfully `myminio/bkt1`.

上传一个文件,执行命令如下:

./mc cp ./minio myminio/bkt1/a1.txt

控制台的输出,如下:

/home/jackie/software/minio/minio:   91.57 MiB / 91.57 MiB ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.78 MiB/s 19s

至此,使用单节点单硬盘方式部署MinIO即完成,可以开始后续的探索。

标签:minio,mc,object,入门,ms,9000,MinIO
From: https://www.cnblogs.com/jackieathome/p/17902490.html

相关文章

  • Vue入门
    一、vue官网:https://cn.vuejs.org/index.html1.1Vue的简单概述1.1.1、介绍:Vue是一套用于构建用户界面的渐进式框架。与其它大型框架不同的是,Vue被设计为可以自底向上逐层应用。Vue的核心库只关注视图层,不仅易于上手,还便于与第三方库或既有项目整合。另一方面,当与现代化的......
  • 网络入门初学第一期
    网络入门初学第一期正式学习网络也有一段时间了,不能盲目的埋头苦学,为了学完而学,今天就根据之前的课程做一期总结对之前的知识进线汇总,当然以下内容均为个人理解首先我们来谈谈PC【个人电脑】在很久很久以前,我们的电脑只是本地的进行工作与运算的 当然,如果仅仅是一台电脑,对......
  • Python从入门到实践project飞船射击外星人3
    完善记分系统1确保难度升级分值跟着升级2将分值显示为10的整数倍3显示最高分4显示等级5显示剩余飞船数确保难度升级分值跟着升级self.alien_points=int(self.alien_points*self.score_scale)print(self.alien_points)print确保分值变化,确保后删除将分值显示为10的整数倍......
  • 05 基础入门——资产架构&端口&应用&WAF&站库分离&负载均衡
    一、资产架构1、网站配置(1)目录型网站安全bbs.xiaodi8.com  dz论坛      #该域名下有一套网站程序,dz论坛bbs.xiaodi8.com/blog wp程序  #该域名的某个目录下也配置了一套网站程序总结:一个网站,两个程序,其中任何一个程序出现漏洞,都可以进入安全测试(同一服务器......
  • 03_系统移植入门
    03_系统移植入门移植的基本步骤确定目标机、主机的连接方式(已完成)安装交叉编译器(已完成)搭建主机-目标及数据传输通道(已完成)编译三大子系统烧写测试uboot常用命令https://blog.csdn.net/conjimmy/article/details/128693548print打印uboot中已经集成好的环境......
  • Istio从入门到精通—— 流量治理的原理 —— VirutalService —— HTTPRouteDestinati
     流量治理的原理——VirutalService——HTTPRouteDestinationhttps://istio.io/latest/docs/reference/config/networking/virtual-service/#HTTPRouteDestination Eachroutingruleisassociatedwithoneormoreserviceversions(seeglossaryinbeginning......
  • MySQL运维4-Mycat入门
    一、mycat概述mycat是阿里巴巴企业下的开源的,基于JAVA语言编写的MySQL数据库中间件,可以像使用MySQL一样来使用Mycat,对于开发人员来说根本感觉不到mycat的存在。之前在国内使用数据库分库分表,读写分离最主流的就是使用mycat,但是截止到今日2023-12-13日,mycat的网站的下载链接......
  • 零基础 从 yolo8 入门计算机视觉超简单:物体识别、图像分类、轨迹追踪、姿势识别
    目录安装Ultralytics训练模型验证预测&识别导出追踪图像分割提取分类姿势识别轨迹生成UltralyticsYOLOv8是备受好评的实时目标检测和图像分割模型,主要功能是物体识别、分割图片物体、分类、姿态识别和跟踪等。Ultralytics支持使用CPU、GPU进行训练,支持x64、arm64等CPU......
  • 【SpringBootWeb入门-12】MySQL-DDL-图形化工具
    1、章节前言上一篇文章我们讲解了MySQL的安装与配置,以及相关sql命令的执行操作,在演示这些sql语句的时候,我们都是在命令行当中进行操作的,在命令行当中敲写语句很不方便,主要原因有以下几点:无提示:命令行当中输入任何sql语句没有任何提示,全凭记忆,而且很容易敲错代码;操作繁琐:全部的......
  • Java从入门到放弃(知识体系图谱)
    一、Java学习路线话不多说,先来一张劝退图!!!二、Java并发学习路线下面是一张关于Java并发编程的思维导图,大的方向可以分为三个部分:线程基础、理论基础、工具类JUC三、Java虚拟机一张关于JVM的思维导图,大的方向可以分为三个部分:字节码与类的加载、内存与垃圾回收、性能监......