MinIO Java Client Learning.
No. |
Key |
Value |
Remark |
1 |
MinIO Console |
http://127.0.0.1:9001 |
|
2 |
Admin Account |
admin |
|
3 |
Admin Password |
admin123 |
|
4 |
Normal Account |
newuser |
Only authorize newbucket bucket admin permission |
5 |
Normal Password |
newuser123 |
|
# install
wget https://dl.min.io/server/minio/release/linux-amd64/minio && chmod +x ./minio
# single
export MINIO_ROOT_USER=admin
export MINIO_ROOT_PASSWORD=admin123
mkdir ./data{1..2}
./minio server ./data{1..2} --address "0.0.0.0:9000" --console-address "0.0.0.0:9001"
# install
wget https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x ./mc
./mc config host rm local
./mc config host rm gcs
./mc config host rm s3
./mc config host add minio http://127.0.0.1:9000 admin admin123
./mc config host ls
./mc ls minio
./mc mb minio/newbucket
date > test.txt
./mc cp test.txt minio/newbucket
./mc ls minio/newbucket
./mc cat minio/newbucket/test.txt
./mc cp minio/newbucket/test.txt .
./mc rm minio/newbucket/test.txt
./mc rb --force minio/newbucket
./mc du minio
./mc admin info minio/
./mc admin user list minio
./mc admin user add minio newuser newuser123
#./mc admin user disable minio newuser
#./mc admin user enable minio newuser
./mc admin user info minio newuser
./mc admin user remove minio newuser
# https://docs.min.io/docs/minio-admin-complete-guide.html
./mc admin policy list minio
./mc admin policy info minio readonly
./mc admin policy info minio writeonly
./mc admin policy info minio readwrite
cat > newbucketAdmin.json <<-'EOF'
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::newbucket/*"
]
}]
}
EOF
./mc admin policy add minio newbucketAdmin newbucketAdmin.json
./mc admin policy remove minio newbucketAdmin
./mc admin policy set minio newbucketAdmin user=newuser
./mc admin policy unset minio newbucketAdmin user=newuser