minio 安装过程
更新于 阅读 4 次
minio 安装过程
在使用minio前试过nextcloud,反复折腾后有问题,就转向了minio,minio的安装还是非常顺利
Docker-compose.yml
minio: image: "minio/minio" hostname: minio restart: always volumes: - "./minio/data:/data" #数据 - "./minio/config:/root/.minio/" #映射配置目录 - "./minio/log:/var/log:z" # 日志 environment: - MINIO_ACCESS_KEY=xxx #管理后台用户名 - MINIO_SECRET_KEY=xxxx #管理后台密码,最小8个字符 ports: - "9000:9000" - "9001:9001" command: server /data --console-address ":9001" #指定容器中的目录 /data
Nginx
server { listen 80; server_name xxxx; return 301 https://$host$request_uri; } server { #SSL 访问端口号为 443 listen 443 ssl http2; #填写绑定证书的域名 server_name xxxx; #启用 SSL 功能 ssl on; #证书文件名称 ssl_certificate /etc/nginx/ssl/1_xxx_bundle.crt; #私钥文件名称 ssl_certificate_key /etc/nginx/ssl/2_xxx.key; ssl_session_timeout 10m; #请按照这个协议配置 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #请按照这个套件配置,配置加密套件,写法遵循 openssl 标准。 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers 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_connect_timeout 300; # Default is HTTP/1, keepalive is only enabled in HTTP/1.1 proxy_http_version 1.1; proxy_set_header Connection ""; chunked_transfer_encoding off; proxy_pass http://localhost:9001; # If you are using docker-compose this would be the hostname i.e. minio # Health Check endpoint might go here. See https://www.nginx.com/resources/wiki/modules/healthcheck/ # /minio/health/live; } }
nginx指向的端口为9001,因为指向9000时会重定向到9001,这个还没搞清楚是为什么.
登陆界面如下:
中文文档http://docs.minio.org.cn/docs/master/golang-client-quickstart-guide