mc安装和环境配置

本文涉及的产品
Serverless 应用引擎 SAE,800核*时 1600GiB*时
注册配置 MSE Nacos/ZooKeeper,118元/月
服务治理 MSE Sentinel/OpenSergo,Agent数量 不受限
简介: 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,其他环境未验证。

目录
相关文章
|
1月前
|
关系型数据库 MySQL 应用服务中间件
win7系统搭建PHP+Mysql+Apache环境+部署ecshop项目
这篇文章介绍了如何在Windows 7系统上搭建PHP、MySQL和Apache环境,并部署ECShop项目,包括安装配置步骤、解决常见问题以及使用XAMPP集成环境的替代方案。
40 1
win7系统搭建PHP+Mysql+Apache环境+部署ecshop项目
|
4月前
|
安全 网络安全 Apache
Windows下Apache部署多个php项目
在 Windows 系统下,使用 Apache 服务器发布多个 PHP 项目是一项常见的任务。本文将介绍如何在 Windows 操作系统下使用 Apache 发布多个 PHP 项目。在 Windows 操作系统下使用 Apache 发布多个 PHP 项目可能有一些挑战,但是只要您按照本文的步骤进行操作,您就可以成功地完成这项任务。希望本文能够对您有所帮助。
106 0
|
Windows
WINDOWS用VS2010开发NPAPI插件步骤
WINDOWS用VS2010开发NPAPI插件步骤
86 0
|
网络协议 Unix 编译器
Windows Go 开发环境下载、安装并配置
Windows Go 开发环境下载、安装并配置
514 0
|
Java
Java环境配置 win10教程
Java环境配置 jdk资源下载 环境配置 1.解压jdk 自己选择路径(后面用到)比如我的路径 2.开始配置 JAVA_HOME设置 在系统变量点击新建 Path变量 ClassPath变量 最后 检验是否成功
134 0
Java环境配置 win10教程
|
分布式计算 Java 关系型数据库
tigase在windows上安装并通过spark进行测试
关于即时通讯,现在各路APP基本都有,虽然不能说是核心,但是如果没有又总会觉的少点啥。 如果对即时通讯要求不高,且用户量不大,只是想要从无到有的话,可以直接使用现有的服务即可,有不少免费的足够支持小量用户的要求。但是如果用户量稍微较大,且需要一些定制服务又不想受制于人,那么搭建自己的即时通讯服务器可能是你最终的选择。但是,从头开发肯定是不可能的。
tigase在windows上安装并通过spark进行测试
|
IDE 应用服务中间件 Go
go安装+Windows10+环境配置+idea配置+演示Demo【详细教程】
go安装+Windows10+环境配置+idea配置+演示Demo【详细教程】
805 0
|
Ubuntu NoSQL PHP
coder| 重回 win 开发环境之基于 wsl2 的 PHP 开发环境
目前还在初步使用阶段中, 能把 hyperf-skeleton 跑起来, 后续使用过程中遇到更多场景, 会陆续更新到新的 blog 中
622 0
|
分布式计算 Java Spark
Windows上搭建Standalone模式的Spark环境
在Windows上搭建Standalone Spark环境
8011 0

热门文章

最新文章