• minio 单机版安装


    Minio 单机版安装

    1.linux下载minio二进制文件

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

    官网下载不下来下载下面链接

    链接:https://pan.baidu.com/s/1DkSK-uL1f9M7XaS8JwSpow 提取码:cu07
    –来自百度网盘超级会员V6的分享

    2.给当前下载的minio应用赋予权限

    chmod +x minio 
    
    • 1

    设置账号密码

    nginx 配置代理

    # minio 控制台端口
    upstream minioconsoleserver{
        server 127.0.0.1:9000;
    }
    # minio 后端server端口
    upstream minioserver {
        server 127.0.0.1:9001;
    }
    
    # 代理 minio后端server
    server {
        listen       443 ssl default_server;
        server_name  sxweb.sjzc.edu.cn;
        #ssl on;
        
        ssl_certificate /etc/nginx/star_sjzc_edu_cn.pem;
        ssl_certificate_key /etc/nginx/myprivate.key;
    
        #必须 防止请求头丢失
        underscores_in_headers on;   
    
    
        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_host;
            proxy_http_version 1.1;
            proxy_set_header Connection "";
            proxy_pass http://minioserver;
            client_max_body_size 100g;
            client_body_buffer_size 100m; 
            index  index.html index.htm;
            proxy_connect_timeout 300s;
            proxy_send_timeout 300s;
            proxy_read_timeout 300s;
        }
    
    
      
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;
        }
    
       
    }
    # 代理minio控制台
    server{
        listen 8080;
        #域名,根据实际情况修改
        server_name sxweb.sjzc.edu.cn;
        client_max_body_size 20m;
    
        access_log /var/log/nginx/host.access.log main;
    
        #前台,根据实际情况修改
        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header Host $http_host;
            proxy_connect_timeout  300;
            # 设置最大请求体最大大小 (因为要上传大量视频,设置到最大,如果太小会报413 Request Entity Too Large)
            client_max_body_size 100g;
            client_body_buffer_size 100m; 
            # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
            proxy_http_version 1.1;
            proxy_set_header Connection "";
            proxy_pass http://minioconsoleserver;
        }
    
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73

    注:用nginx为minio管理端配置二级路径会导致静态资源找不到,所以只能用http访问了。

    3.控制台运行

    # 创建文件夹
    mkdir /home/minio/data 
    # 设置文件存放地址   设置端口号 后台运行minio服务
    MINIO_SERVER_URL=https://sxweb.sjzc.edu.cn MINIO_ROOT_USER=train MINIO_ROOT_PASSWORD=train@minio nohup ./minio server /home/minio/data  > /home/minio/logs/minio.log --console-address=":9000" --address=":9001" 2>&1 &
    
    • 1
    • 2
    • 3
    • 4

    参数解释:

    • MINIO_SERVER_URL minio服务端地址,如果配置了代理这里必须设置,否则默认以内网ip 为serverUrl ,生成的图片地址访问不到
    • MINIO_ROOT_USER 控制台用户名
    • MINIO_ROOT_PASSWORD 密码
    • –console-address 控制台端口号
    • –address 服务端 端口号
    # 设置文件存放地址   设置端口号 后台运行minio服务
    MINIO_SERVER_URL=https://sxweb.sjzc.edu.cn MINIO_ROOT_USER=train MINIO_ROOT_PASSWORD=train@minio nohup ./minio server /home/nfs/data/minio > /home/nfs/data/minio/logs/minio.log --console-address=":9000" --address=":9001" 2>&1 &
    
    • 1
    • 2

    补充:docker方式部署

    docker run -d \ 
    --name minio \   
    --restart=always \   
    -p 9000:9000 \   
    -p 8080:9001 \   
    -e "MINIO_ROOT_USER=minioroot" \   
    -e "MINIO_ROOT_PASSWORD=minioroot" \  
    -e "MINIO_SERVER_URL=http://sxweb.sjzc.edu.cn:8080"
    -v /home/minio/data:/data \   
    -v /home/minio/config:/root/.minio  minio/minio:RELEASE.2022-02-12T00-51-25Z server /data --console-address ":9001"
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
  • 相关阅读:
    什么是网站监控,网站监控软件有什么用?
    HTTP的请求方法,空行,body,介绍请求报头的内部以及粘包问题
    探究Socks5代理和代理IP在技术领域的多重应用
    # Dasctf 7月赋能赛 WP
    MySQL数据库指令 DML语法
    Wnt 信号通路
    某大学ipv6和ipv4结合的校园网规划设计
    JDK1.8源码下载及idea2021导入jdk1.8源码
    markdown绘制流程图相关代码片段记录
    TMS Aurelius v5.15 Source Crack
  • 原文地址:https://blog.csdn.net/qq_45473439/article/details/126098341