[Unit]Description=MinIO
Documentation=https://silo.pgsty.com/zh/docs/
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio
[Service]Type=notify
WorkingDirectory=/usr/local
User=minio-user
Group=minio-user
ProtectProc=invisible
EnvironmentFile=-/etc/default/minio
ExecStart=/usr/local/bin/minio server $MINIO_OPTS$MINIO_VOLUMES# Let systemd restart this service alwaysRestart=always
# Specifies the maximum file descriptor number that can be opened by this processLimitNOFILE=1048576# Turn-off memory accounting by systemd, which is buggy.MemoryAccounting=no
# Specifies the maximum number of threads this process can createTasksMax=infinity
# Disable timeout logic and wait until process is stoppedTimeoutSec=infinity
# Disable killing of MinIO by the kernel's OOM killerOOMScoreAdjust=-1000
SendSIGKILL=no
[Install]WantedBy=multi-user.target
# Built for ${project.name}-${project.version} (${project.name})
# Set the hosts and volumes MinIO uses at startup# The command uses MinIO expansion notation {x...y} to denote a# sequential series.## The following example covers four MinIO hosts# with 4 drives each at the specified hostname and drive locations.## The command includes the port that each MinIO server listens on# (default 9000).# If you run without TLS, change https -> httpMINIO_VOLUMES="https://minio{1...4}.example.net:9000/mnt/disk{1...4}/minio"# Set all MinIO server command-line options## The following explicitly sets the MinIO Console listen address to# port 9001 on all network interfaces.# The default behavior is dynamic port selection.MINIO_OPTS="--console-address :9001 --certs-dir /opt/minio/certs"# Set the root username.# This user has unrestricted permissions to perform S3 and# administrative API operations on any resource in the deployment.## Defer to your organizations requirements for superadmin user name.MINIO_ROOT_USER=minioadmin
# Set the root password## Use a long, random, unique string that meets your organizations# requirements for passwords.MINIO_ROOT_PASSWORD=minio-secret-key-CHANGE-ME
# Set the volumes MinIO uses at startup# The command uses MinIO expansion notation {x...y} to denote a# sequential series.## The following specifies a single host with 4 drives at the specified location## The command includes the port that the MinIO server listens on# (default 9000).# If you run without TLS, change https -> httpMINIO_VOLUMES="https://minio1.example.net:9000/mnt/drive{1...4}/minio"# Set all MinIO server command-line options## The following explicitly sets the MinIO Console listen address to# port 9001 on all network interfaces.# The default behavior is dynamic port selection.MINIO_OPTS="--console-address :9001 --certs-dir /opt/minio/certs"# Set the root username.# This user has unrestricted permissions to perform S3 and# administrative API operations on any resource in the deployment.## Defer to your organizations requirements for superadmin user name.MINIO_ROOT_USER=minioadmin
# Set the root password## Use a long, random, unique string that meets your organizations# requirements for passwords.MINIO_ROOT_PASSWORD=minio-secret-key-CHANGE-ME
# Set the volume MinIO uses at startup## The following specifies the drive or folder pathMINIO_VOLUMES="/mnt/drive1/minio"# Set all MinIO server command-line options## The following explicitly sets the MinIO Console listen address to# port 9001 on all network interfaces.# The default behavior is dynamic port selection.MINIO_OPTS="--console-address :9001 --certs-dir /opt/minio/certs"# Set the root username.# This user has unrestricted permissions to perform S3 and# administrative API operations on any resource in the deployment.## Defer to your organizations requirements for superadmin user name.MINIO_ROOT_USER=minioadmin
# Set the root password## Use a long, random, unique string that meets your organizations# requirements for passwords.MINIO_ROOT_PASSWORD=minio-secret-key-CHANGE-ME