官站:
https://min.io/
系统环境:
ubuntu20
安装server
https://min.io/download#/linux
wget https://dl.min.io/server/minio/release/linux-amd64/minio_20210712024453.0.0_amd64.deb
dpkg -i minio_20210712024453.0.0_amd64.deb
创建文件夹
mkdir /export
修改启动参数
vim /etc/default/minio
MINIO_OPTS='--address 0.0.0.0:9000 --console-address 0.0.0.0:9001'
MINIO_VOLUMES='/export/'
MINIO_ROOT_USER='minioadmin'
MINIO_ROOT_PASSWORD='minioadmin'
修改service用户
vim /etc/systemd/system/minio.service
#User=minio-user
#Group=minio-user
User=root
Group=root
启动server
systemctl start minio.service
安装mcli
wget https://dl.min.io/client/mc/release/linux-amd64/mcli_20210613174822.0.0_amd64.deb
dpkg -i mcli_20210613174822.0.0_amd64.deb
mcli alias set minio/ http://localhost:9000 minioadmin minioadmin
之后在/root/.mcli/config.json中会生成minio服务的连接地址
"minio": {
"url": "http://127.0.0.1:9000",
"accessKey": "minioadmin",
"secretKey": "minioadmin",
"api": "s3v4",
"path": "auto"
},
使用
#创建桶
mcli mb minio/hello
#查看生成的文件夹
ls /export/
hello
使用页面创建桶
http://127.0.0.1:9001/login
mcli帮助
NAME:
mcli - MinIO Client for cloud storage and filesystems.
USAGE:
mcli [FLAGS] COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...]
COMMANDS:
alias set, remove and list aliases in configuration file
ls list buckets and objects
mb make a bucket
rb remove a bucket
cp copy objects
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
share generate URL for temporary access to an object
find search for objects
sql run sql queries on objects
stat show object metadata
mv move objects
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)
diff list differences in object name, size, and date between two buckets
rm remove objects
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
policy manage anonymous access to buckets and objects
tag manage tags for bucket and object(s)
replicate configure server side bucket replication
admin manage MinIO servers
update update mc to latest release
GLOBAL FLAGS:
--autocompletion install auto-completion for your shell
--config-dir value, -C value path to configuration folder (default: "/root/.mcli")
--quiet, -q disable progress bar display
--no-color disable color theme
--json enable JSON lines formatted output
--debug enable debug output
--insecure disable SSL certificate verification
--help, -h show help
--version, -v print the version
TIP:
Use 'mcli --autocompletion' to enable shell autocompletion
VERSION:
RELEASE.2021-06-13T17-48-22Z