MinIO是一款高性能、开源的分布式对象存储系统,专为云原生和容器化环境设计,基于Go语言编写,兼容Amazon S3 API,能够无缝集成到现有的S3生态系统中,MinIO使用分布式架构来存储和管理大规模的非结构化数据,如图片、视频、日志文件等,提供高可用性、可扩展性和数据持久性
华为云端口放行
- 服务器放行对应端口9000,9001
Docker安装并配置镜像加速
1、购买华为云 Flexus X 实例
Flexus云服务器X实例-华为云 (huaweicloud.com)
2、docker安装
yum install -y docker-ce
3、验证 Docker 是否安装成功,启动docker服务并设置开机自启动,且查看docker状态
docker --version
systemctl enable docker
systemctl start docker
systemctl status docker
4、docker-ce下载
wget -O /etc/yum.repos.d/docker-ce.repo https://mirrors.huaweicloud.com/docker-ce/linux/centos/docker-ce.repo
5、路径/etc/yum.repos.d修改配置文件
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/9.9/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
[docker-ce-stable-debuginfo]
name=Docker CE Stable - Debuginfo $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/9.9/debug-$basearch/stable
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
[docker-ce-stable-source]
name=Docker CE Stable - Sources
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/9.9/source/stable
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
[docker-ce-test]
name=Docker CE Test - $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/9.9/$basearch/test
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
[docker-ce-test-debuginfo]
name=Docker CE Test - Debuginfo $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/9.9/debug-$basearch/test
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
[docker-ce-test-source]
name=Docker CE Test - Sources
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/9.9/source/test
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
[docker-ce-nightly]
name=Docker CE Nightly - $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/9.9/$basearch/nightly
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
[docker-ce-nightly-debuginfo]
name=Docker CE Nightly - Debuginfo $basearch
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/9.9/debug-$basearch/nightly
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
[docker-ce-nightly-source]
name=Docker CE Nightly - Sources
baseurl=https://repo.huaweicloud.com/docker-ce/linux/centos/9.9/source/nightly
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/docker-ce/linux/centos/gpg
6、清除和构建缓存
yum clean all
yum makecache
7、docker配置镜像加速(在华为云镜像中心可获取自己的镜像加速配置)
8、创建镜像加速配置文件
vim /etc/docker/daemon.json
{
"registry-mirrors": [ "https://fd0cfec0ac0d446db7fd9d27e92d4a8e.mirror.swr.myhuaweicloud.com" ]
}
9、重新加载配置文件,重新启动docker,查看是否配置成功
systemctl daemon-reload
systemctl restart docker.service
10、docker info查看配置信息,是否配置成功镜像加速
docker info
搭建MinIO
1、MinIO镜像拉取
docker pull minio/minio
2、创建挂载目录和上传文件目录
mkdir -p /opt/minio/config
mkdir -p /opt/minio/data
3、创建容器并运行
docker run -p 9000:9000 -p 9001:9001 --name minio -d --restart=always -e "MINIO_ACCESS_KEY=minio" -e "MINIO_SECRET_KEY=minio123" -v /opt/minio/data:/data -v /opt/minio/config:/root/.minio minio/minio server /data --console-address ":9001"
4、浏览器地址访问,登录即可,成功搭建
- 搭建MinIO之后,可以轻松地存储、管理和访问大规模的非结构化数据,如图片、视频、日志文件等,MinIO支持分布式部署,能够提供高可用性和数据冗余,确保数据的安全性和持久性
总结
华为云服务器Flexus X实例,Docker集成搭建MinIO,搭建MinIO之后,可以轻松地存储、管理和访问大规模的非结构化数据,如果有用户跟我有一样需求,可以购买华为云服务器来搭建,目前华为云服务器正在优惠期间,性价比非常高!
华为云828 Flexus X实例
特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.