赞
踩
创建一个data目录
--address和--console-address是MinIO服务器启动命令中的两个参数,它们具有以下区别:
--address参数:用于指定MinIO服务器监听的S3 API访问地址。S3 API是用于与MinIO进行对象存储操作的接口,例如上传、下载、删除对象等。通过--address参数,您可以指定MinIO服务器监听的IP地址和端口。例如,--address '0.0.0.0:9001'表示MinIO服务器将监听所有网络接口上的9001端口。
--console-address参数:用于指定MinIO服务器控制台的访问地址。控制台是MinIO的管理界面,提供了用户友好的界面来管理存储桶、对象和访问权限等。通过--console-address参数,您可以指定MinIO服务器控制台的IP地址和端口。例如,--console-address '0.0.0.0:9002'表示MinIO服务器的控制台将监听所有网络接口上的9002端口。
总结起来,--address参数用于S3 API访问,而--console-address参数用于MinIO服务器控制台访问。它们允许您分别指定不同的IP地址和端口来处理这两种类型的访问请求。
- wget https://dl.minio.io/server/minio/release/linux-amd64/minio
- yum install -y wget
- yum install -y wget
- wget https://dl.minio.io/server/minio/release/linux-amd64/minio
- chmod +x minio
- sudo mv minio /usr/local/bin/
- minio --version
- sudo groupadd --system minio
- sudo useradd -s /sbin/nologin --system -g minio minio
- sudo chown -R minio:minio /data/
- mkdir /data
- sudo chown -R minio:minio /data/
-
-
- cat << EOF > /etc/systemd/system/minio.service
- # Volume to be used for Minio server.
- MINIO_VOLUMES="/data"
- # Use if you want to run Minio on a custom port.
- MINIO_OPTS="--address :9001"
- # Access Key of the server.
- MINIO_ACCESS_KEY=minio
- # Secret key of the server.
- MINIO_SECRET_KEY=minioadmin
- EOF
-
- cat << EOF > /etc/systemd/system/minio.service
- [Unit]
- Description=Minio
- Documentation=https://docs.minio.io
- Wants=network-online.target
- After=network-online.target
- AssertFileIsExecutable=/usr/local/bin/minio
-
- [Service]
- WorkingDirectory=/data
- User=minio
- Group=minio
- EnvironmentFile=-/etc/default/minio
- ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /etc/default/minio\"; exit 1; fi"
- ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES
- # Let systemd restart this service always
- Restart=always
- # Specifies the maximum file descriptor number that can be opened by this process
- LimitNOFILE=65536
- # Disable timeout logic and wait until process is stopped
- TimeoutStopSec=infinity
- SendSIGKILL=no
-
- [Install]
- WantedBy=multi-user.target
- EOF
-
- cat << EOF > /etc/default/minio
-
- # Volume to be used for Minio server.
- MINIO_VOLUMES="/data"
-
- # Use if you want to run Minio on a custom port.
- #MINIO_OPTS="--address :9001"
- MINIO_OPTS="--address 0.0.0.0:9001 --console-address '0.0.0.0:9002'"
-
-
- # Access Key of the server.
- MINIO_ACCESS_KEY=minio
-
- # Secret key of the server.
- MINIO_SECRET_KEY=minioadmin
- EOF
-
- sudo systemctl daemon-reload
- sudo systemctl start minio
- yum install -y net-tools
-
- netstat -tunlp | grep 9001 -w
-
- netstat -tunlp | grep 9002 -w
-
ip:9000
minio
minioadmin
公网地址
ip:9002
minio
***********
minio与阿里云oss
官方文档
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。