minio分布式部署

原文链接:https://blog.csdn.net/yeyiboy/article/details/113118815
一、至少准备四个节点

192.168.0.100    m1
192.168.0.101    m2
192.168.0.102    m3
192.168.0.103    m4

二、部署(在m1机器上进行目录的创建)

1、创建相关目录

mkdir -p /usr/local/minio/{bin,etc,data1,data2}

2、下载minio文件

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

3、编辑启动脚本

vim /usr/local/minio/bin/minioStart.sh

#!/bin/bash
export MINIO_ACCESS_KEY=admin    #用户名
export MINIO_SECRET_KEY=admin     #密码



ETC=/usr/local/minio/
BIN=/usr/local/minio/

nohup $BIN/minio server --config-dir $ETC/minio --address "0.0.0.0:9400" http://192.168.0.100:9400/home/microShopProje
ct/minio/data   http://192.168.0.100:9400/home/microShopProject/minio/data1 http://192.168.0.101:9400/home/microShop
Project/minio/data http://192.168.0.101:9400/home/microShopProject/minio/data1 > /home/microShopProject/minio/log/mini
o.log & 2>&1

#$BIN/minio server --config-dir $ETC/minio \
#--address "0.0.0.0:9400" \

#http://192.168.0.100/usr/local/minio/data
#http://192.168.0.100/usr/local/minio/data1
#http://192.168.0.101/usr/local/minio/data
#http://192.168.0.101/usr/local/minio/data1
#http://192.168.0.102/usr/local/minio/data
#http://192.168.0.102/usr/local/minio/data1

4、创建systemd文件

vim /usr/lib/systemd/system/minio.service
[Unit]
Description=Minio service
Documentation=https://docs.minio.io/

[Service]
WorkingDirectory=/usr/local/minio/
ExecStart=/usr/local/minio/bin/minioStart.sh
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target

5、修改权限并启动集群

chmod +x /usr/lib/systemd/system/minio.service && chmod +x /usr/local/minio/bin/minioStart.sh
systemctl daemon-reload
systemctl start minio
systemctl enable minio

6、将机器m1的操作在其余机器都执行一遍

三、访问

     192.168.0.100:9400

四、负载配置

1、安装nginx

2、vim  nginx.conf

upstream http_minio {
    server 192.168.0.100:9400;
    server 192.168.0.101:9400;
    server 192.168.0.102:9400;
}


server {
    listen       9405;
    server_name  localhost;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    ignore_invalid_headers off;
    client_max_body_size 0;
    proxy_buffering off;
    location / {
            proxy_set_header   X-Real-IP $remote_addr;
            proxy_set_header   X-Forwarded-Host  $host:$server_port;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Proto  $http_x_forwarded_proto;
            proxy_set_header   Host $http_host;
            proxy_connect_timeout 300;
            proxy_http_version 1.1;
            chunked_transfer_encoding off;
            proxy_ignore_client_abort on;
            proxy_pass http://http_minio;

    }
尊重作者转载请说明出处
内容:minio分布式部署
URL:https://www.daadn.cn/archives/149.html
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇