minio部署


1. 下载

https://dl.min.io/server/minio/release/linux-amd64/minio

 

2. minio 拷贝到 /usr/local/bin/目录

mv  minio /usr/local/bin/
chmod +x /usr/local/bin/minio

 

3. 设置配置文件

vim  /etc/minio/minio.cnf

MINIO_ACCESS_KEY=senyint
MINIO_SECRET_KEY=gyqtfqclsgvuxuwum.cmhkn59CHekacb
MINIO_VOLUMES="http://192.168.20.136/export1 http://192.168.20.136/export2 http://192.168.20.161/export1 http://192.168.20.161/export2"
MINIO_OPTS="--address :9000"

 

4. 设置systemctl 启动文件

[root@localhost data]# cat /usr/lib/systemd/system/minio.service 
[Unit]
Description=Minio
Documentation=https://docs.minio.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio
 
[Service]
WorkingDirectory=/usr/local/
 
User=root
Group=root
 
EnvironmentFile=-/etc/minio/minio.cnf
 ExecStart=/usr/local/bin/minio server $MINIO_OPTS 
 
StandardOutput=journal
StandardError=inherit
 
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
 
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=0
 
# SIGTERM signal is used to stop Minio
KillSignal=SIGTERM
 SendSIGKILL=no
 SuccessExitStatus=0
 
[Install]
WantedBy=multi-user.target

 

5. 启动

systemctl daemon-reload
systemctl start minio
systemctl enable minio
systemctl stop minio

 

6. nginx反向代理

[root@haproxy1 vhost]# cat testminio_xxxxx_com.conf 

    server {
        listen       80;

        server_name  testminio.xxxxx.com;

        location / {

        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

            proxy_pass http://testminioxxxxx;
        }


        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

       rewrite ^(.*)$  https://$host$1 permanent;



   }
###########################################################
    server {
        listen       443;
        server_name  testminio.xxxxx.com;

        ssl on;
        ssl_certificate /data/nginx/sslkey/xxxx.cer;
        ssl_certificate_key /data/nginx/sslkey/xxxxx.key;
        ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
    ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES128-SHA:AES128-SHA256:AES256-SHA:AES256-SHA256:DES-CBC3-SHA;

        access_log  logs/foundation_443.access.log;
        error_log logs/foundation_443.error.log;

        location / {

        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

            proxy_pass http://testminioxxxxxx;
        }


        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
   }

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM