minio

minio

部署

下载

# wget https://dl.min.io/server/minio/release/linux-amd64/minio
# chmod +x minio

密码设置

  • 将密码将入环境变量
# cat /etc/profile|tail -n 3
export MINIO_ROOT_USER=minio
export MINIO_ROOT_PASSWORD=RGrBM2hUsdfsdfM9m!

# source /etc/profile

启动

  • /opt/minio/data: 数据目录
  • --config-dir:配置文件
  • --console-address : 控制台端口
  • --address:api端口
/opt/minio/bin/minio server /opt/minio/data --config-dir /opt/minio/conf --address :9000 --console-address :9090

页面:

客户端上传下载

  1. 下载客户端工具
https://dl.min.io/client/mc/release/linux-amd64/mc
  1. 生成客户端连接文件
mc config host add minio http://10.1.162.42:9090 
  1. 查看自动生成文件,将控制台中创建ak,sk,以及minio api的地址
  • 这里aliases.minio为我自己写入的配置
[root@VM-162-42-centos run]# cat /root/.mc/config.json 
{
	"version": "10",
	"aliases": {
		"gcs": {
			"url": "https://storage.googleapis.com",
			"accessKey": "YOUR-ACCESS-KEY-HERE",
			"secretKey": "YOUR-SECRET-KEY-HERE",
			"api": "S3v2",
			"path": "dns"
		},
		"local": {
			"url": "http://localhost:9000",
			"accessKey": "",
			"secretKey": "",
			"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"
		},
          "minio": {
              "url": "http://10.1.162.42:9000",
              "accessKey": "dupsIAxXUQNDsIgzLGF1",
               "secretKey": "zycYQASHkp9bFjuOOhvuPtMyi2pisivVxYAuYLMZ",
               "api": "S3v4",
               "path": "dns"
         }
	}
}

  1. 文件上传

mc cp 服务器中的文件 别名/bucket/上传存储文件

[root@VM-162-42-centos run]# mc cp startup.sh minio/test/startup.sh
  1. 查看bucket
# mc ls minio
[2023-11-09 14:47:05 CST]     0B test/
posted @ 2023-11-09 15:28  元气少女郭德纲!!  阅读(180)  评论(0编辑  收藏  举报