官方文档地址
创建程序目录、数据子目录、证书子目录
mkdir /usr/local/minio
cd /usr/local/minio
mkdir data
mkdir certs
创建软连接
ln -s /usr/local/minio/minio /usr/local/bin/minio
创建环境变量文件
vim /usr/local/minio/environment.config
# Volume to be used for MinIO server.
MINIO_VOLUMES="/usr/local/minio/data/"
# Use if you want to run MinIO on a custom port.
MINIO_OPTS="--address :9000 --certs-dir=/usr/local/minio/certs/"
# Access Key of the server.
MINIO_ACCESS_KEY=root
# Secret key of the server.
MINIO_SECRET_KEY=sdfj1lkmv-92nf9-mvn1x9
创建系统服务
创建服务文件
vim /usr/local/minio/minio.service
[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio
[Service]
WorkingDirectory=/usr/local/minio
User=root
Group=root
EnvironmentFile=/usr/local/minio/environment.config
ExecStartPre=/bin/bash -c "if [ -z \"${MINIO_VOLUMES}\" ]; then echo \"Variable MINIO_VOLUMES not set in /usr/local/minio/environment.config\"; 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
# Built for ${project.name}-${project.version} (${project.name})
创建软链接
ln -s /usr/local/minio/minio.service /etc/systemd/system/minio.service
启动服务
systemctl enable minio
systemctl start minio
systemctl status minio
证书问题
名称和路径保持一致,CAs目录为空
rclone复制文件
./rclone copy pta-source:/ pta-dest:/ -P --create-empty-src-dirs