mc安装和环境配置

简介: mc安装和环境配置

本文介绍,mc的安装

mc介绍

*==> 官方文档*

The MinIO Client mc command line tool provides a modern alternative to UNIX commands like ls, cat, cp, mirror, and diff with support for both filesystems and Amazon S3-compatible cloud storage services.

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

mc has the following syntax:

  mc [GLOBALFLAGS] COMMAND --help
  See Command Quick Reference for a list of supported commands.

AGPLv3

mc is AGPLv3 licensed Free and Open Source (FOSS) software.

Applications integrating mc may trigger AGPLv3 compliance requirements. MinIO Commercial Licensing is the best option for applications which trigger AGPLv3 obligations where open-sourcing the application is not an option.

Version Alignment with MinIO Server

The MinIO Client releases separately from the MinIO Server.

For best functionality and compatibility, use a MinIO Client version released closely to your MinIO Server version. For example, a MinIO Client released the same day or later than your MinIO Server version.

You can install a version of the MinIO Client that is more recent than the MinIO Server version. However, if the MinIO Client version skews too far from the MinIO Server version, you may see increased warnings or errors as a result of the differences. For example, while core S3 APIs around copying (mc cp) may remain unchanged, some features or flags may only be available or stable if the client and server versions are aligned.

大白话解释

mc是MinIO的客户端,可以用于管理minio和aws s3。不完全兼容其他S3存储服务。不过对于咱们管理S3和minio来说,已经完全足够。

安装方法

  • Linux

    • 64-bit Intel

      官网提供的命令代码
      ```shell
      curl https://dl.min.io/client/mc/release/linux-amd64/mc \
      --create-dirs \
      -o $HOME/minio-binaries/mc

      chmod +x $HOME/minio-binaries/mc
      export PATH=$PATH:$HOME/minio-binaries/

      mc --help

      ><span style="color: red;">我实际在机器上的命令代码</span>
      ```shell
      curl https://dl.min.io/client/mc/release/linux-amd64/mc --create-dirs -o mc
      
      chmod +x mc
      
      mv mc /usr/bin/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                                               
        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                                                  
        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: "/root/.mc")
        --quiet, -q                   disable progress bar display                       
        --no-color                    disable color theme
      
    • 64-bit PPC

      curl https://dl.min.io/client/mc/release/linux-ppc64le/mc \
      --create-dirs \
      -o ~/minio-binaries/mc
      
      chmod +x $HOME/minio-binaries/mc
      export PATH=$PATH:$HOME/minio-binaries/
      
      mc --help
      
    • ARM64

      curl https://dl.min.io/client/mc/release/linux-arm64/mc \
      --create-dirs \
      -o ~/minio-binaries/mc
      
      chmod +x $HOME/minio-binaries/mc
      export PATH=$PATH:$HOME/minio-binaries/
      
      mc --help
      
  • macOs
    brew install minio/stable/mc
    mc --help
    
  • Windows

    Open the following file in a browser: https://dl.min.io/client/mc/release/windows-amd64/mc.exe
    或下载 https://dl.min.io/client/mc/release/windows-amd64/mc.exe
    
    Execute the file by double clicking on it, or by running the following in the command prompt or powershell:
    
    \path\to\mc.exe --help
    
    或
    
    添加 mc.exe 到环境变量中,然后在命令行中执行
    mc --help
    

    我实际在机器上的命令代码
    ```shell
    Invoke-WebRequest -Uri "https://dl.minio.io/client/mc/release/windows-amd64/mc.exe" -OutFile "C:\Windows\mc.exe"

    mc --help
    ```

  • Source

    Installation from source is intended for developers and advanced users and requires a working Golang environment. See How to install Golang.

    Run the following commands in a terminal environment to install mc from source:

    go install github.com/minio/mc@latest
    

    能不用源码安装就不用源码安装,源码安装需要golang环境,而且golang环境安装比较麻烦,所以不推荐

环境配置

在使用mc之前,需要先配置环境变量,配置环境变量的命令如下:

假定 minio-server已经启动
Minio API访问地址为:http://minio-api.xxxx.com
用户名为:user,密码为:password
预计设置的别名为 minio

bash +o history
mc alias set minio http://minio-api.xxxx.com user password
bash -o history

检查配置情况

mc admin info minio

# 输出结果如下
●  http://minio-api.xxxx.com
   Uptime: 1 month 
   Version: 2023-09-23T03:47:50Z
   Network: 1/1 OK 
   Drives: 1/1 OK 
   Pool: 1

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

33 GiB Used, 5 Buckets, 55 Objects
1 drive online, 0 drives offline

情况说明

我在window环境和linux环境(X64)都安装了mc,其他环境未验证。

目录
相关文章
|
关系型数据库 MySQL 数据安全/隐私保护
关于Navicat Premium连接MySQL出现2059错误解决方法
关于Navicat Premium连接MySQL出现2059错误解决方法
|
Go API
一文搞懂Go读写Excel文件
一文搞懂Go读写Excel文件
563 0
|
Linux 对象存储 Windows
MinIO 客户端安装与使用教程
详细讲解MinIO CLI的安装与使用
6216 0
|
人工智能 自然语言处理 前端开发
社区Committer LofiSu:在Apache Fory,每一份贡献都不会被忽视
一起走近用代码编织跨语言数据之网的Committer
|
存储 算法 开发工具
|
数据可视化 数据挖掘 Linux
震撼发布!Python数据分析师必学,Matplotlib与Seaborn数据可视化实战全攻略!
在数据科学领域,数据可视化是连接数据与洞察的桥梁,能让复杂的关系变得直观。本文通过实战案例,介绍Python数据分析师必备的Matplotlib与Seaborn两大可视化工具。首先,通过Matplotlib绘制基本折线图;接着,使用Seaborn绘制统计分布图;最后,结合两者在同一图表中展示数据分布与趋势,帮助你提升数据可视化技能,更好地讲述数据故事。
489 1
|
存储 人工智能 Prometheus
剑指大规模 AI 可观测,阿里云 Prometheus 2.0 应运而生
本文介绍了阿里云Prometheus 2.0方案,针对大规模AI系统的可观测性挑战进行全面升级。内容涵盖数据采集、存储、计算、查询及生态整合等维度。 Prometheus 2.0引入自研LoongCollector实现多模态数据采集,采用全新时序存储引擎提升性能,并支持RecordingRule与ScheduleSQL预聚合计算。查询阶段提供跨区域、跨账号的统一查询能力,结合PromQL与SPL语言增强分析功能。此外,该方案已成功应用于阿里云内部AI系统,如百炼、通义千问等大模型全链路监控。未来,阿里云将发布云监控2.0产品,进一步完善智能观测技术栈。
1449 42
|
安全 vr&ar 计算机视觉
AR智能眼镜在警务安防的人脸识别场景,有哪些应用和优势?
AR智能眼镜结合人脸识别技术,为安防领域带来高效精准的解决方案。通过实时采集与分析人脸信息,快速识别重点人员并即时报警,广泛应用于机场、车站、大型活动等场景,显著提升安全防控能力。
AR智能眼镜在警务安防的人脸识别场景,有哪些应用和优势?
|
存储 安全 Linux
CentOS安装SeaweedFS
通过上述步骤,您应该能够在CentOS系统上成功安装并启动SeaweedFS。记住,根据实际部署规模和需求,可能还需要进一步调整配置参数和优化网络布局。SeaweedFS的灵活性和扩展性意味着随着使用深入,您可能需要探索更多高级配置和管理策略。
560 61
|
数据可视化 JavaScript 前端开发
Python中交互式Matplotlib图表
【10月更文挑战第20天】Matplotlib 是 Python 中最常用的绘图库之一,但默认生成的图表是静态的。通过结合 mpld3 库,可以轻松创建交互式图表,提升数据可视化效果。本文介绍了如何使用 mpld3 在 Python 中创建交互式散点图、折线图和直方图,并提供了详细的代码示例和安装方法。通过添加插件,可以实现缩放、平移和鼠标悬停显示数据标签等交互功能。希望本文能帮助读者掌握这一强大工具。

热门文章

最新文章