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
# Specifies the maximum number of threads this process can create TasksMax=infinity
# 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})
# cat /etc/default/minio # MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server. # This user has unrestricted permissions toperform S3 and administrative API operations onany resource in the deployment. # Omit to use the defaultvalues'minioadmin:minioadmin'. # MinIO recommends setting non-defaultvaluesas a best practice, regardless of environment
MINIO_ROOT_USER=USER MINIO_ROOT_PASSWORD=PASSWORD
# Use if you want to run MinIO on a custom port. # MINIO_OPTS="--address :9199 --console-address :9001" MINIO_OPTS="--console-address :40167"
# MINIO_VOLUMES sets the storage volume orpathto use for the MinIO server.
MINIO_VOLUMES="/data/web_server/minio_data"
# MINIO_SERVER_URL sets the hostname of the local machine for use with the MinIO Server # MinIO assumes your network control plane can correctly resolve this hostname to the local machine
4) 启动 MinIO 服务
在本地主机上发出以下命令以启动 MinIO SNSD部署作为服务:
sudo systemctl start minio.service
使用以下命令确认服务在线且正常运行:
sudo systemctl status minio.service journalctl -f -u minio.service
# systemctl status minio -l ● minio.service - MinIO Loaded: loaded (/etc/systemd/system/minio.service; disabled; vendor preset: disabled) Active: active (running) since Fri 2023-05-12 11:44:29 CST; 16s ago Docs: https://min.io/docs/minio/linux/index.html Process: 1702456 ExecStartPre=/bin/bash -c if [ -z "${MINIO_VOLUMES}" ]; then echo "Variable MINIO_VOLUMES not set in /etc/default/minio"; exit 1; fi (code=exited, status=0/SUCCESS) Main PID: 1702459 (minio) CGroup: /system.slice/minio.service └─1702459 /usr/local/bin/minio server --console-address :40167 /data/web_server/minio_data
May 12 11:44:30 ksgame-gamecloud-minio-test-1.hb.txyun minio[1702459]: Copyright: 2015-2023 MinIO, Inc. May 12 11:44:30 ksgame-gamecloud-minio-test-1.hb.txyun minio[1702459]: License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html> May 12 11:44:30 ksgame-gamecloud-minio-test-1.hb.txyun minio[1702459]: Version: RELEASE.2023-04-13T03-08-07Z (go1.20.3 linux/amd64) May 12 11:44:30 ksgame-gamecloud-minio-test-1.hb.txyun minio[1702459]: Status: 1 Online, 0 Offline. May 12 11:44:30 ksgame-gamecloud-minio-test-1.hb.txyun minio[1702459]: API: http://10.73.198.192:9000 http://127.0.0.1:9000 May 12 11:44:30 ksgame-gamecloud-minio-test-1.hb.txyun minio[1702459]: Console: http://10.73.198.192:40167 http://127.0.0.1:40167 May 12 11:44:30 ksgame-gamecloud-minio-test-1.hb.txyun minio[1702459]: Documentation: https://min.io/docs/minio/linux/index.html May 12 11:44:30 ksgame-gamecloud-minio-test-1.hb.txyun minio[1702459]: Warning: The standard parity is set to 0. This can lead to data loss. May 12 11:44:30 ksgame-gamecloud-minio-test-1.hb.txyun minio[1702459]: You are running an older version of MinIO released 3 weeks ago May 12 11:44:30 ksgame-gamecloud-minio-test-1.hb.txyun minio[1702459]: Update: Run `mc admin update`
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
# MinIO RELEASE.2023-05-04T21-44-30Z adds support for Type=notify (https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=) # This may improve systemctl setups where other services use `After=minio.server` # Uncomment the line to enable the functionality # Type=notify
# Let systemd restart this service always Restart=always
# Specifies the maximum file descriptor number that can be opened by this process LimitNOFILE=65536
# Specifies the maximum number of threads this process can create TasksMax=infinity
# 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})
cat minio # MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server. # This user has unrestricted permissions to perform S3 and administrative API operations on any resource in the deployment. # Omit to use the default values 'minioadmin:minioadmin'. # MinIO recommends setting non-default values as a best practice, regardless of environment
MINIO_ROOT_USER=USER MINIO_ROOT_PASSWORD=PASSWORD
# Use if you want to run MinIO on a custom port. # MINIO_OPTS="--address :9199 --console-address :9001" MINIO_OPTS="--console-address :40167 --address :9000"
# MINIO_VOLUMES sets the storage volume or path to use for the MinIO server.
# MINIO_SERVER_URL sets the hostname of the local machine for use with the MinIO Server # MinIO assumes your network control plane can correctly resolve this hostname to the local machine [sre@game-cs002 /home/sre/game-scripts/minio]$cat minio # MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server. # This user has unrestricted permissions to perform S3 and administrative API operations on any resource in the deployment. # Omit to use the default values 'minioadmin:minioadmin'. # MinIO recommends setting non-default values as a best practice, regardless of environment
# Use if you want to run MinIO on a custom port. # MINIO_OPTS="--address :9199 --console-address :9001" MINIO_OPTS="--console-address :9001 --address :9000"
# MINIO_VOLUMES sets the storage volume or path to use for the MinIO server.
# MINIO_SERVER_URL sets the hostname of the local machine for use with the MinIO Server # MinIO assumes your network control plane can correctly resolve this hostname to the local machine