首页 > 其他分享 >MINIO搭建单机以及集群

MINIO搭建单机以及集群

时间:2022-11-06 18:34:02浏览次数:57  
标签:https minio 单机 docs min 集群 io root MINIO

MINIO搭建单机以及集群_ide

MINIO简介

    Minio是Apache License v2.0下发布的对象存储服务器。它与Amazon S3云存储服务兼容。它最适合存储非结构化数据,如照片,视频,日志文件,备份和容器/VM映像。对象的大小可以从几KB到最大5TB。Minio服务器足够轻,可以与应用程序堆栈捆绑在一起,类似于NodeJS,Redis和MySQL。

​      https://docs.minio.io/​


一、单机版搭建

操作系统

搭建方式

Linux

docker

Linux

宿主机


1. docker模式搭建

1.1安装docker

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
[root@localhost ~]# systemctl start docker #启动docker
[root@localhost ~]# docker ps -a #查看一下命令是否可以执行
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@localhost ~]#


1.2使用docker安装MINIO

[root@localhost ~]# docker search minio
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
minio/minio Kubernetes Native, High Performance Object S… 445 [OK]
minio/mc Minio Client (mc) provides a modern alternat… 22 [OK]
bitnami/minio Bitnami MinIO Docker Image 6
pixelchrome/minio-arm This Dockerfile installs Minio on your ARM-P… 5
jessestuart/minio Minio server — supports arm (arm32v6, arm32v… 5
minio/console A graphical user interface for MinIO server 4
webhippie/minio Docker images for Minio 3 [OK]
opennms/minion Application container runs Minion by OpenNMS… 3 [OK]
bitnami/minio-client Bitnami MinIO Client Docker Image 3
rook/minio Minio is a high performance distributed obje… 2
rancher/minio-minio 1
zenithar/minio-server Minio.io Server in Alpine Linux docker 1 [OK]
teamwork/minio Minio for Teamwork 1
azinchen/minio Minio server Docker image. Always up-to-date… 1
minio/mint Collection of tests to detect overall correc… 0 [OK]
tobilg/minio-dcos minio on DC/OS 0 [OK]
topdockercat/minio-unraid Minio is an Amazon S3 compatible object stor… 0 [OK]
keikoproj/minion-manager https://github.com/orkaproj/minion-manager 0
joepll/minio-exporter Prometheus exporter for Minio server 0
opsmx11/minio Minio for Openshift 0 [OK]
leviy/minio Minio image for development and testing of (… 0 [OK]
minio/k8s-operator Minio Operator for k8s https://kubernetes.io/ 0
rwsdockercf/minio-resource 0
nerc/minio Minio container for use in the datalab proje… 0 [OK]
kazesberger/miniomc-postgres this image is used to create postgres dumps … 0
[root@localhost ~]#
[root@localhost ~]# docker pull minio/minio
Using default tag: latest
latest: Pulling from minio/minio
8f403cb21126: Pull complete
65c0f2178ac8: Pull complete
6e32ce08526e: Pull complete
932fb72de569: Pull complete
71bfd33c61af: Pull complete
588b2addab38: Pull complete
093f7de724c9: Pull complete
Digest: sha256:fe69dcaed404faa1a36953513bf2fe2d5427071fa612487295eddb2b18cfe918
Status: Downloaded newer image for minio/minio:latest
docker.io/minio/minio:latest
[root@localhost ~]#
[root@localhost ~]# docker run -p 9000:9000 --name minio1 \
> -e "MINIO_ACCESS_KEY=admin" \
> -e "MINIO_SECRET_KEY=12345678" \
> -v /Users/xiyou/my_minio/data:/data \
> -v /Users/xiyou/my_minio/config:/root/.minio \
> minio/minio server /data
Endpoint: http://172.17.0.2:9000 http://127.0.0.1:9000


Browser Access:
http://172.17.0.2:9000 http://127.0.0.1:9000


Object API (Amazon S3 compatible):
Go: https://docs.min.io/docs/golang-client-quickstart-guide
Java: https://docs.min.io/docs/java-client-quickstart-guide
Python: https://docs.min.io/docs/python-client-quickstart-guide
JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
.NET: https://docs.min.io/docs/dotnet-client-quickstart-guide
IAM initialization complete


1.3使用该命令将其放置在后台启动

[root@localhost ~]# docker run -d -p 9000:9000 --name minio1 \
> -e "MINIO_ACCESS_KEY=admin" \
> -e "MINIO_SECRET_KEY=12345678" \
> -v /my_minio/data:/data \
> -v /my_minio/config:/root/.minio \
> minio/minio server /data
b6fca0d91b4bc5ef5f5b4b2a77a6f4761fc18e1d4b08f88519304813b52586d7
[root@localhost ~]#

MINIO搭建单机以及集群_ide_02

MINIO搭建单机以及集群_docker_03



1.4宿主机安装


[root@localhost ~]# wget https://dl.min.io/server/minio/release/linux-amd64/minio
--2021-05-12 23:14:06-- https://dl.min.io/server/minio/release/linux-amd64/minio
Resolving dl.min.io (dl.min.io)... 178.128.69.202
Connecting to dl.min.io (dl.min.io)|178.128.69.202|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58748928 (56M) [application/octet-stream]
Saving to: ‘minio’


minio 100%[============================================================================>] 56.03M 7.24MB/s in 9.5s


2021-05-12 23:14:17 (5.89 MB/s) - ‘minio’ saved [58748928/58748928]


[root@localhost ~]# chmod +x minio
[root@localhost ~]# MINIO_ACCESS_KEY=minio MINIO_SECRET_KEY=minio123 ./minio server /cby
Endpoint: http://192.168.100.139:9000 http://127.0.0.1:9000
RootUser: minio
RootPass: minio123


Browser Access:
http://192.168.100.139:9000 http://127.0.0.1:9000


Command-line Access: https://docs.min.io/docs/minio-client-quickstart-guide
$ mc alias set myminio http://192.168.100.139:9000 minio minio123


Object API (Amazon S3 compatible):
Go: https://docs.min.io/docs/golang-client-quickstart-guide
Java: https://docs.min.io/docs/java-client-quickstart-guide
Python: https://docs.min.io/docs/python-client-quickstart-guide
JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
.NET: https://docs.min.io/docs/dotnet-client-quickstart-guide
IAM initialization complete

MINIO搭建单机以及集群_docker_04



二、集群版搭建


2. 集群搭建

2.1 集群服务器配置及启动



启动一个分布式Minio实例,你只需要把硬盘位置做为参数传给minio server命令即可,然后,你需要在所有其它节点运行同样的命令。


*注意


    分布式Minio里所有的节点需要有同样的access秘钥和secret秘钥,这样这些节点才能建立联接。为了实现这个,你需要在执行minio server命令之前,先将access秘钥和secret秘钥export成环境变量。同时分布式Minio使用的磁盘里必须是干净的,里面没有数据。


    分布式Minio里的节点时间差不能超过3秒,你可以使用NTP 来保证时间一致。在Windows下运行分布式Minio处于实验阶段,请悠着点使用。

参考:https://docs.min.io/cn/distributed-minio-quickstart-guide.html


名称

IP

node

192.168.100.138

node

192.168.100.139

node

192.168.100.140

node

192.168.100.141

MINIO搭建单机以及集群_docker_05

2.2每台上面搭建


[root@localhost software]# mkdir -p /chenby/software
[root@localhost software]# cd /chenby/software
[root@localhost software]# wget https://dl.min.io/server/minio/release/linux-amd64/minio
--2021-05-13 00:06:25-- https://dl.min.io/server/minio/release/linux-amd64/minio
Resolving dl.min.io (dl.min.io)... 178.128.69.202
Connecting to dl.min.io (dl.min.io)|178.128.69.202|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58748928 (56M) [application/octet-stream]
Saving to: ‘minio’


minio 100%[============================================================================>] 56.03M 1.95MB/s in 21s


2021-05-13 00:06:48 (2.63 MB/s) - ‘minio’ saved [58748928/58748928]


[root@localhost software]# chmod +x minio
[root@localhost software]# MINIO_ACCESS_KEY=minio MINIO_SECRET_KEY=minio123 ./minio server http://192.168.100.138/chenby/software/cby http://192.168.100.139/chenby/software/cby http://192.168.100.140/chenby/software/cby http://192.168.100.141/chenby/software/cby
Waiting for all MinIO sub-systems to be initialized.. lock acquired
All MinIO sub-systems initialized successfully
Status: 4 Online, 0 Offline.
Endpoint: http://192.168.100.138:9000 http://127.0.0.1:9000
RootUser: minio
RootPass: minio123


Browser Access:
http://192.168.100.138:9000 http://127.0.0.1:9000


Command-line Access: https://docs.min.io/docs/minio-client-quickstart-guide
$ mc alias set myminio http://192.168.100.138:9000 minio minio123


Object API (Amazon S3 compatible):
Go: https://docs.min.io/docs/golang-client-quickstart-guide
Java: https://docs.min.io/docs/java-client-quickstart-guide
Python: https://docs.min.io/docs/python-client-quickstart-guide
JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
.NET: https://docs.min.io/docs/dotnet-client-quickstart-guide
Waiting for all MinIO IAM sub-system to be initialized.. lock acquired
IAM initialization complete


2.3 访问测试

[root@localhost ~]# curl -I http://192.168.100.138:9000/minio/login
HTTP/1.1 403 Forbidden
Accept-Ranges: bytes
Content-Length: 256
Content-Type: application/xml
Server: MinIO
Vary: Origin
Date: Wed, 12 May 2021 16:09:19 GMT


[root@localhost ~]# curl -I http://192.168.100.139:9000/minio/login
HTTP/1.1 403 Forbidden
Accept-Ranges: bytes
Content-Length: 256
Content-Type: application/xml
Server: MinIO
Vary: Origin
Date: Wed, 12 May 2021 16:09:25 GMT


[root@localhost ~]# curl -I http://192.168.100.140:9000/minio/login
HTTP/1.1 403 Forbidden
Accept-Ranges: bytes
Content-Length: 256
Content-Type: application/xml
Server: MinIO
Vary: Origin
Date: Wed, 12 May 2021 16:09:32 GMT


[root@localhost ~]# curl -I http://192.168.100.141:9000/minio/login
HTTP/1.1 403 Forbidden
Accept-Ranges: bytes
Content-Length: 256
Content-Type: application/xml
Server: MinIO
Vary: Origin
Date: Wed, 12 May 2021 16:09:36 GMT


MINIO搭建单机以及集群_linux_06








标签:https,minio,单机,docs,min,集群,io,root,MINIO
From: https://blog.51cto.com/u_12212643/5827509

相关文章

  • MinIO搭建本地图床
    本文记录了使用MiniIO搭建本地图床,搭配PicGo实现Typora图片自动上传。壹丨为什么要搭建本地图床?由于公司保密要求高,网盘、云笔记类软件一概不得使用,多番尝试过后,决定......
  • macOS使用docker搭建hadoop集群
    启动集群安装docker下载网址:https://www.docker.com/products/docker-desktop/构建基础镜像拉取centos镜像dockerpullcentos:7.5.1804创建文件夹,将jdk安装包放入,......
  • K8S HA(高可用)集群搭建
    1,背景kubernetes高可用集群搭建,如果使用命令行进行部署的话会有各种时间同步、网络连通插件或者等等一系列事情要做,这个如果本职工作是运维工程师或者说云服务运维开发工......
  • redis的三种集群方案(主从复制、哨兵模式、集群模式)
    redis的三种集群方案(主从复制、哨兵模式、集群模式)单个redis的读写能力是有限的(虽然已经很强了),并且存在不稳定性。当唯一的redis服务宕机了,就没有可用的redis服务了,......
  • openstack单机部署
    注:centos8单机版 注:本次实验手动配置密码均为admin环境准备:配置hosts文件192.168.116.8为本机IPecho'192.168.116.8controllervipmyip'>>/etc/hostsyumupgrad......
  • 安装nacos集群
    架构图下载nacos安装包从github上下载相应的安装包,现在是2022-11-04,最新稳定版本是2.1.2修改配置解压后,进入conf文件夹因为本次使用mysql,所以使用nacos_mysql......
  • Kubernetes(k8s)集群安装JupyterHub以及Lab
    背景JupyterHub为用户组带来了笔记本的强大功能。它使用户能够访问计算环境和资源,而不会给用户带来安装和维护任务的负担。用户——包括学生、研究人员和数据科学家——可......
  • KubeSphere 高可用集群搭建并启用所有插件
    介绍大多数情况下,单主节点集群大致足以供开发和测试环境使用。但是,对于生产环境,您需要考虑集群的高可用性。如果关键组件(例如kube-apiserver、kube-scheduler和kube-cont......
  • 单机 “5千万以上“ 工业级 LRU cache 实现
    文章目录​​前言​​​​工业级LRUCache​​​​1.基本架构​​​​2.基本操作​​​​2.1insert操作​​​​2.2高并发下insert的一致性/性能保证​​​​2.3L......
  • redis 集群重启两种方式
    关闭集群:redis-cli-c-h192.168.10.137-p7000shutdown  redis-cli-c-h192.168.10.137-p7001shutdown  redis-cli-c-h192.168.10.137-p7002shutdo......