首页 > 其他分享 >minio 多节点部署

minio 多节点部署

时间:2024-10-26 16:09:06浏览次数:6  
标签:25 20 minio 部署 51 节点 minio2 Oct

先决条件

firewalld 配置

firewall-cmd --permanent --zone=public --add-port=9000/tcp
firewall-cmd --reload

节点说明

cat >> /etc/hosts << EOF
192.168.174.100 minio-01 
192.168.174.101 minio-02 
EOF

挂载点

mkdir -pv /data/disk1/minio
mkdir -pv /data/disk2/minio
mkdir -pv /data/disk3/minio

格式化磁盘

mkfs.xfs /dev/sdb
mkfs.xfs /dev/sdc
mkfs.xfs /dev/sdd

挂载磁盘

echo `blkid |grep /dev/sdb | awk '{print $2}'` /data/disk1/minio xfs defaults 0 0 >> /etc/fstab
echo `blkid |grep /dev/sdc | awk '{print $2}'` /data/disk2/minio xfs defaults 0 0 >> /etc/fstab
echo `blkid |grep /dev/sdd | awk '{print $2}'` /data/disk3/minio xfs defaults 0 0 >> /etc/fstab
mount -a

时间同步

# yum -y install chrony

创建 minio 用户

groupadd  minio && useradd -M -N -g minio  -d /home/minio -s /bin/false -c "minio Server" minio 
chown -R minio:minio /data/disk1  /data/disk2 /data/disk3

下载 MinIO

wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
sudo mv minio /usr/local/bin/

minio.service

cat > /lib/systemd/system/minio.service << EOF
[Unit]
Description=MinIO
Documentation=https://min.io/docs/minio/linux/index.html
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio

[Service]
WorkingDirectory=/usr/local

User=minio-user
Group=minio-user
ProtectProc=invisible

EnvironmentFile=-/etc/default/minio
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"
ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES --certs-dir /home/minio/.minio/certs

Restart=always

LimitNOFILE=65536

TasksMax=infinity

TimeoutStopSec=infinity
SendSIGKILL=no

[Install]
WantedBy=multi-user.target
EOF

生成配置文件

cat > /etc/default/minio << EOF
MINIO_VOLUMES="https://minio{1...2}.wgs.com:19000/data/disk{1...3}/minio"
MINIO_OPTS="--address :19000 --console-address :19001"
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=minio-secret-key-CHANGE-ME      # 按需修改
EOF
# chmod +x /etc/default/minio

生成 TLS 证书

openssl.conf

cat > openssl.conf << EOF
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no

[req_distinguished_name]
C = CN
ST = beijing
L = beijing
O = wgs
OU = wgs
CN = minio

[v3_req]
subjectAltName = @alt_names

[alt_names]
IP.1 = 192.168.174.100
IP.2 = 192.168.174.101
DNS.1 = minio1.wgs.com
DNS.2 = minio2.wgs.com
EOF

创建证书路径

mkdir -pv /home/minio/.minio/certs/CAs

生成 private pkcs8 key

openssl genrsa -out /home/minio/.minio/certs/private-pkcs8-key.key 2048
Generating RSA private key, 2048 bit long modulus
..............+++
..........................+++
e is 65537 (0x10001)

转成 private pkcs1 key

openssl rsa -in /home/minio/.minio/certs/private-pkcs8-key.key  -out /home/minio/.minio/certs/private.key
writing RSA key

自签证书

openssl req -new -x509 -nodes -days 3650 -keyout /home/minio/.minio/certs/private.key -out /home/minio/.minio/certs/public.crt -config openssl.conf
Generating a 2048 bit RSA private key
.......+++
......................................................................................+++
writing new private key to 'private.key'
-----

验证证书

openssl x509 -in public.crt -text -noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            b1:4b:66:a1:5a:25:74:33
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=CN, ST=beijing, L=beijing, O=wgs, OU=wgs, CN=minio
        Validity
            Not Before: Oct 25 12:37:37 2024 GMT
            Not After : Oct 23 12:37:37 2034 GMT
        Subject: C=CN, ST=beijing, L=beijing, O=wgs, OU=wgs, CN=minio
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    00:e9:07:27:c4:7b:bf:c5:84:03:23:c3:67:d0:ee:
                    0b:37:4d:a8:5f:73:97:b0:51:da:2e:20:3d:10:17:
                    48:19:82:79:93:ef:35:51:64:13:84:d6:48:5f:65:
                    51:6b:ed:28:ea:a4:4f:65:7e:68:66:61:44:e3:20:
                    25:f9:14:4e:ab:26:0a:66:ab:aa:8b:64:cd:2f:8a:
                    b1:d1:1f:ed:46:c2:04:73:b9:21:48:3e:9e:8b:93:
                    2a:95:06:2c:ef:13:e9:33:ba:6b:f5:94:99:01:fe:
                    5d:62:aa:26:e2:65:81:56:19:26:71:01:25:0f:f3:
                    60:78:ce:37:4b:4f:4a:14:e6:ed:89:d5:b4:4b:74:
                    4f:44:f4:84:f3:40:50:dd:4e:f0:71:c8:d9:4a:f9:
                    4a:b5:8d:30:ea:8d:86:29:52:45:7c:cf:d4:68:c0:
                    73:dc:04:68:dd:58:86:ce:71:24:b7:cd:c6:d1:b5:
                    8a:e9:13:77:81:c1:36:35:6c:3a:6b:ea:66:16:77:
                    cc:91:b8:0f:8a:ad:87:61:c0:e7:31:34:fc:de:0e:
                    af:af:fd:d0:b1:84:b3:84:dc:7e:71:2e:94:80:4e:
                    17:d1:c7:6b:25:40:8e:53:84:2c:4b:9b:ab:53:cd:
                    a3:5a:c1:26:e9:a1:8c:dd:6b:df:63:9b:0a:55:a4:
                    99:af
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Alternative Name: 
                IP Address:192.168.174.100, IP Address:192.168.174.101, DNS:minio1.wgs.com, DNS:minio2.wgs.com  
    Signature Algorithm: sha256WithRSAEncryption
         37:67:b0:7f:69:3b:ae:51:dc:c3:df:b0:ac:8e:39:13:3b:bc:
         e4:ec:0f:8e:5e:d8:fa:99:d4:3f:fc:45:bd:59:7c:1d:50:84:
         39:47:61:af:b2:fa:ae:8a:36:6f:df:99:27:7b:8f:9d:a4:57:
         e5:0f:c5:f6:8e:1b:a0:1b:c5:8d:d9:03:2b:c1:d1:d1:b1:14:
         36:63:fa:2d:74:b8:a5:31:4a:be:db:69:1e:b7:10:b9:92:a0:
         bd:72:dd:8f:cc:ca:dd:bc:ce:12:7f:9f:a6:29:8c:cd:bb:6c:
         2a:1e:76:8a:6a:be:fe:3e:c1:c4:99:d2:83:2d:4d:92:1e:28:
         e6:68:64:df:29:c3:9d:e5:89:b5:01:62:61:ef:f8:25:c9:65:
         cb:5a:46:9e:eb:22:55:b9:a7:39:70:d7:c2:cf:fc:c2:0e:d8:
         8d:65:44:2f:5a:9d:1c:ae:8d:53:79:49:ee:51:46:a1:ab:c6:
         61:26:d9:ca:2e:4e:6c:86:d0:16:4c:0b:f5:6d:df:f0:3a:8a:
         43:7b:65:1e:7f:db:e3:a4:13:5b:ae:96:c8:7a:89:1e:02:49:
         b5:b5:5a:50:af:f9:4e:5b:d5:73:f3:e3:54:bc:80:5e:02:88:
         78:38:39:43:85:7f:02:9e:5a:b8:c3:4e:dd:c6:4d:5c:6f:c6:
         a9:4b:dc:d7

更改证书属主

# chown -R minio.minio /home/minio

运行 MinIO 

systemctl enable minio --now

查看日志

Oct 25 20:32:51 minio2 minio[145328]: INFO: Waiting for all MinIO sub-systems to be initialize...
Oct 25 20:32:51 minio2 minio[145328]: INFO: Configured max API requests per node based on available memory: 41819
Oct 25 20:32:51 minio2 minio[145328]: INFO: All MinIO sub-systems initialized successfully in 21.250084ms
Oct 25 20:32:51 minio2 minio[145328]: INFO: IAM load(startup) finished. (duration: 3.451392ms)
Oct 25 20:32:51 minio2 minio[145328]: ---------------------------
Oct 25 20:32:51 minio2 minio[145328]: MinIO Object Storage Server
Oct 25 20:32:51 minio2 minio[145328]: Copyright: 2015-2024 MinIO, Inc.
Oct 25 20:32:51 minio2 minio[145328]: License: GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html
Oct 25 20:32:51 minio2 minio[145328]: Version: RELEASE.2024-10-13T13-34-11Z (go1.22.8 linux/amd64)
Oct 25 20:32:51 minio2 minio[145328]: API:  https://192.168.174.100:19000  https://127.0.0.1:19000
Oct 25 20:32:51 minio2 minio[145328]: WebUI:  https://192.168.174.100:19001 https://127.0.0.1:19001
Oct 25 20:32:51 minio2 minio[145328]: Docs: https://docs.min.io
Oct 25 20:32:51 minio2 minio[145328]: ---------------------------

登录 minio dashboard

https://192.168.174.100:19001

查看节点信息

minio 客户端部署

curl https://dl.min.io/client/mc/release/linux-amd64/mc \
  --create-dirs \
  -o $HOME/minio-binaries/mc

chmod +x $HOME/minio-binaries/mc
export PATH=$PATH:$HOME/minio-binaries/

mc --help

参考文档

https://min.io/docs/minio/linux/operations/install-deploy-manage/deploy-minio-multi-node-multi-drive.html#

标签:25,20,minio,部署,51,节点,minio2,Oct
From: https://www.cnblogs.com/wangguishe/p/18502666

相关文章

  • gdal部署及java调用详细过程(linux版本-ubuntu)
    建议gdal用3.5.3前的版本,因为目前网上大部分文章都是适用这个版本之前的编译方法一、gdal部署1)安装gcc通过系统包管理器安装sudoaptinstallgccgcc--version2)安装g++通过系统包管理器安装sudoaptinstallg++g++--version3)安装Ant通过系统包管理器安装sudoapt-g......
  • nginx 代理 minio
    nginx.confupstreamminio_s3{least_conn;serverminio-01.internal-domain.com:9000;serverminio-02.internal-domain.com:9000;serverminio-03.internal-domain.com:9000;serverminio-04.internal-domain.com:9000;}upstreamminio_console{......
  • 基于Vue+NodeJS+express的预约上门维修服务运营与数据分析系统(源码+node+vue+部署文
    收藏关注不迷路!!......
  • 仓储管理系统(源码+文档+部署+讲解)
    仓储管理系统、智能仓储管理平台、库存优化控制系统、仓库自动化管理系统、库存智能调配系统、仓储资源规划系统、智能库存监控系统、仓库作业执行系统、库存管理与分析系统、仓库管理智能平台、库存流转跟踪系统、智能供应链管理平台供应商本文将深入解析“仓储管理系统”的项目,探......
  • 04 springboot-工程搭建案例(多环境部署,数据源, Swagger, 国际化,工具类)
    项目搭建模板(多环境切换)springboot系列,最近持续更新中,如需要请关注如果你觉得我分享的内容或者我的努力对你有帮助,或者你只是想表达对我的支持和鼓励,请考虑给我点赞、评论、收藏。您的鼓励是我前进的动力,让我感到非常感激。文章目录1项目截图2pom.xml3多环境配......
  • 【K8S系列】Kubernetes pod节点Unknown 问题及解决方案详解【已解决】
    在Kubernetes中,Pod的状态为Unknown表示无法获取Pod的当前状态。这通常意味着KubernetesAPI服务器无法与Pod所在的节点通信,或者Kubelet进程遇到问题。以下将详细介绍Unknown状态的原因、解决方案以及如何配置健康检查以提高系统的稳定性。一、Unknown状态......
  • 云服务器进阶-部署springboot项目
    一.通过finalshell登录自己的云服务器大家可以下载绑定资源中的finalshell,通过它来访问我们的服务器,二.访问宝塔面板接着我们输入bt进入上文中我们安装过的宝塔面板。输入14查看面板访问地址以及登陆的用户名密码,第一次登陆时会给我们生成一个默认密码,登录之后我们需要......
  • mongo3.2.7部署文档
     环境搭建与最优配置3台机器10.111.62.21,10.111.62.22,10.111.62.233个分片。每个分片一主一副一仲裁mongo版本mongodb-linux-x86_64-rhel70-3.2.7.tgz(注意版本,根据不同的linux版本选择不同的安装包)保证安装目录下的磁盘空间足够大服务器有8G以上的剩余内存(对于生产环......
  • Zookeeper实战 集群环境部署
    1、概述今天我们来学习一下Zookeeper集群相关的内容,本文主要的内容有集群环境的搭建,集群常见的问题和对应的解决方案。2、集群环境搭建2.1、准备工作首先我们准备好安装包,创建好集群部署的路径。将解压后的安装文件复制三分。这里我在/usr/local目录下创建了一个zkCluster......
  • DISM 支持使用无人值守文件(通常为 .xml 格式)来执行各种操作,特别是在部署和维护 Window
    DISM支持使用无人值守文件(通常为.xml格式)来执行各种操作,特别是在部署和维护Windows映像时。以下是一些可以与无人值守文件一起使用的DISM参数:1. /Apply-Unattend这个参数用于应用无人值守文件到Windows映像。可以在以下命令中使用:bashCopyCodeDism/Image:"C:\Path......