[shawnyan@centos7 ~]$ docker run \ > -p 9000:9000 \ > -p 9090:9090 \ > --name minio \ > -v ~/minio/data:/data \ > -e "MINIO_ROOT_USER=minioadmin" \ > -e "MINIO_ROOT_PASSWORD=minioadmin" \ > minio/minio server /data --console-address ":9090" WARNING: Detected Linux kernel version older than 4.0.0 release, there are some known potential performance problems with this kernel version. MinIO recommends a minimum of 4.x.x linux kernel version for best performance 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. WARNING: Detected default credentials 'minioadmin:minioadmin', we recommend that you change these values with 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD' environment variables MinIO Object Storage Server Copyright: 2015-2023 MinIO, Inc. License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html> Version: RELEASE.2023-08-04T17-40-21Z (go1.19.12 linux/amd64)
[shawnyan@centos7 ~]$ mc --version mc version RELEASE.2023-08-01T23-30-57Z (commit-id=0a529d5e642f1a50a74b256c683be453e26bf7e9) Runtime: go1.19.12 linux/amd64 Copyright (c) 2015-2023 MinIO, Inc. License GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html> [shawnyan@centos7 ~]$ mc alias set local http://127.0.0.1:9000 minioadmin minioadmin mc: Configuration written to `/home/shawnyan/.mc/config.json`. Please update your access credentials. mc: Successfully created `/home/shawnyan/.mc/share`. mc: Initialized share uploads `/home/shawnyan/.mc/share/uploads.json` file. mc: Initialized share downloads `/home/shawnyan/.mc/share/downloads.json` file. Added `local` successfully. [shawnyan@centos7 ~]$ mc admin info local ● 127.0.0.1:9000 Uptime: 1 hour Version: 2023-08-04T17:40:21Z Network: 1/1 OK Drives: 1/1 OK Pool: 1
Pools: 1st, Erasure sets: 1, Drives per erasure set: 1
370 KiB Used, 1 Bucket, 1 Object 1 drive online, 0 drives offline [shawnyan@centos7 ~]$ mc config host ls gcs URL : https://storage.googleapis.com AccessKey : YOUR-ACCESS-KEY-HERE SecretKey : YOUR-SECRET-KEY-HERE API : S3v2 Path : dns
local URL : http://127.0.0.1:9000 AccessKey : minioadmin SecretKey : minioadmin API : s3v4 Path : auto
play URL : https://play.min.io AccessKey : Q3AM3UQ867SPQQA43P2F SecretKey : zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG API : S3v4 Path : auto
s3 URL : https://s3.amazonaws.com AccessKey : YOUR-ACCESS-KEY-HERE SecretKey : YOUR-SECRET-KEY-HERE API : S3v4 Path : dns
[shawnyan@centos7 ~]$
查看存储目录大小
1 2 3 4
[shawnyan@centos7 ~]$ mc du minio/ 391KiB 15 objects minio [shawnyan@centos7 ~]$ mc du minio/data/s3-yan 370KiB 2 objects minio/data/s3-yan