当前位置:网站首页>minio 单机版安装
minio 单机版安装
2022-08-02 23:27:00 【快乐是你的与我无关了】
Minio 单机版安装
1.linux下载minio二进制文件
wget https://dl.min.io/server/minio/release/linux-amd64/minio
官网下载不下来下载下面链接
链接:https://pan.baidu.com/s/1DkSK-uL1f9M7XaS8JwSpow 提取码:cu07
–来自百度网盘超级会员V6的分享
2.给当前下载的minio应用赋予权限
chmod +x minio
设置账号密码
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;
}
}
注:用nginx为minio管理端配置二级路径会导致静态资源找不到,所以只能用http访问了。
3.控制台运行
# 创建文件夹
mkdir /home/minio/data
# 设置文件存放地址 设置端口号 后台运行minio服务
MINIO_SERVER_URL=https://sxweb.sjzc.edu.cn MINIO_ROOT_USER=train MINIO_ROOT_PASSWORD=[email protected] nohup ./minio server /home/minio/data > /home/minio/logs/minio.log --console-address=":9000" --address=":9001" 2>&1 &
参数解释:
- 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 [email protected] nohup ./minio server /home/nfs/data/minio > /home/nfs/data/minio/logs/minio.log --console-address=":9000" --address=":9001" 2>&1 &
补充: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"
边栏推荐
- 用了 TCP 协议,数据一定不会丢吗?
- matplotlib中的3D绘图警告解决:MatplotlibDeprecationWarning: Axes3D(fig) adding itself to the figure
- 科研用Cholesterol-PEG-NHS,NHS-PEG-CLS,胆固醇-聚乙二醇-活性酯
- No-code development platform form styling steps introductory course
- DataGuard日常维护常见问题之数据同步异常
- 最近公共祖先(LCA)学习笔记 | P3379 【模板】最近公共祖先(LCA)题解
- 如何快速对接淘宝开放平台API接口(淘宝店铺订单明文接口,淘宝店铺商品上传接口,淘宝店铺订单交易接口)
- mPEG-Cholesterol,mPEG-CLS,甲氧基-聚乙二醇-胆固醇可用于脂质体制备
- RollBack Rx Professional RMC 安装教程
- js基础知识整理之 —— Math
猜你喜欢
随机推荐
Week 7 - Distributional Representations
微信小程序(一)
markdown语法
Jmeter secondary development to realize rsa encryption
如何快速对接淘宝开放平台API接口(淘宝店铺订单明文接口,淘宝店铺商品上传接口,淘宝店铺订单交易接口)
6、Powershell命令配置Citrix PVS云桌面桌面注销不关机
Teach you to locate online MySQL slow query problem hand by hand, package teaching package meeting
js基础知识整理之 —— Math
函数:计算组合数
Rebound shell principle and implementation
2022杭电多校第一场(K/L/B/C)
程序员英语自我介绍
程序员常说的“左手锟斤拷,右手烫烫烫”是怎么回事?
用大白话解释“什么是ERP?” 看完这篇就全明白了
js基础知识整理之 —— Date和定时器
D experimental new anomaly
服务间歇性停顿问题优化|得物技术
【多线程】Thread类的基本用法
The CTF command execution subject their thinking
主流定时任务解决方案全横评