minio stand-alone installation

Minio stand-alone installation

1.linux download minio binary file

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

Can't download from the official website Download the link below

Link: https://pan.baidu.com/s/1DkSK-uL1f9M7XaS8JwSpow Extraction code: cu07
– share from super member V6 of Baidu Netdisk

2. Grant permission to the currently downloaded minio application

chmod +x minio 

Set account password

nginx configuration proxy

# 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;
    }

}

Note: Using nginx to configure the secondary path for the minio management terminal will cause static resources to not be found, so it can only be accessed with http.

3. Console operation

# 创建文件夹
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 &

Parameter explanation:

  • MINIO_SERVER_URL minio server address, if the proxy is configured, it must be set here, otherwise the default internal network ip is serverUrl, and the generated image address cannot be accessed
  • MINIO_ROOT_USER console username
  • MINIO_ROOT_PASSWORD password
  • –console-address console port number
  • –address server port number
# 设置文件存放地址   设置端口号 后台运行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 &

Supplement: docker deployment

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"

Guess you like

Origin blog.csdn.net/qq_45473439/article/details/126098341