wget -P /usr/bin/ https://dl.min.io/client/mc/release/linux-amd64/mc
chmod u+x /usr/bin/mc
2、配置mc工具
mkdir -p ~/.mc/
cat <<EOF >~/.mc/config.json
"aliases":{
"minio": {
"url": "http://local:9000",
"accessKey": "admin",
"secretKey": "admin",
"api": "S3v4",
"path": "auto"
mc ls minio
4、创建、查看桶
cd ~./mc
mc mb minio/test
mc ls minio
5、创建桶生命周期
mc ilm import minio/test <<EOF
"Rules": [
"Expiration": {
"Days": 30
"ID": "test",
"Filter": {
"Prefix": "test/"
"Status": "Enabled"
mc ilm ls minio/test
6、创建用户密码及权限
cat <<EOF>platform-filesync-dev.json
"Version": "2022-04-17",
"Statement": [
"Action": [
"s3:ListBucket",
"s3:GetBucketLocation",
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
"Effect": "Allow",
"Resource": [
"arn:aws:s3:::test/*"
"Sid": ""
mc admin user add minio test test
mc admin policy add minio test test.json
配置用户角色
mc admin policy set minio test user=test