mkdir -p /usr/local/develop/minio/bin
mkdir -p /usr/local/develop/minio/bin
wget https://dl.min.io/server/minio/release/linux-amd64/minio -O /usr/local/develop/minio/bin/minio
编辑脚本 启动脚本
vim /usr/local/develop/minio/start_minio.sh
#!/bin/bash
# 设置MinIO的配置参数
# 用户名
export MINIO_ROOT_USER=admin
# 密码
export MINIO_ROOT_PASSWORD=13566011394@@@
#设置MinIO端口
#S3-API端口
export MINIO_ADDRESS=":6900" #可按需修改
#Console控制台页面访问端口
export MINIO_CONSOLE_ADDRESS=":9100" # 可按需修改
#设置MinIO安装路径
export MINIO_PATH_DIR="/usr/local/develop/minio/bin"
#设置MinIO配置文件路径
export MINIO_CONFIG_DIR="/usr/local/develop/minio/config"
# 设置数据存储路径
export MINIO_DATA_DIR="/usr/local/develop/minio/data"
# 设置日志存储路径
export MINIO_LOG_DIR="/usr/local/develop/minio/log"
echo "Starting MinIO..."
# 启动MinIO服务器
nohup $MINIO_PATH_DIR/minio server --address $MINIO_ADDRESS --console-address $MINIO_CONSOLE_ADDRESS --config-dir $MINIO_CONFIG_DIR $MINIO_DATA_DIR > $MINIO_LOG_DIR/minio.log 2>&1 &
echo "MinIO started successfully!"
编辑关闭脚本
vim /usr/local/develop/minio/shutdown_minio.sh
#!/bin/bash echo "shutdown minio" pid=`ps -ef | grep 'minio server' | grep -v grep | awk '{print $2}'` if [ -n "$pid" ] then kill -9 $pid fi echo "shutdown minio !!!!!!Success!"
启动之前 手动创建这三个文件夹
不然报没有那个文件或目录
启动命令
bash /usr/local/develop/minio/start_minio.sh
ps -ef|grep minio
bash /usr/local/develop/minio/shutdown_minio.sh
nginx加上websocket支持 不然桶进去之后一直转圈圈
server {
listen 80;
server_name console.minio.summergao.com;
location / {
proxy_pass http://0.0.0.0:37382; # 端口转发
# 添加了websocket支持
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}