[Unit]
Description=MinIO
Documentation=https://docs.min.io
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio
[Service]
#Type=notify
#Type=notify意味着该服务将通过发送一个信号给systemd来通知,其启动状态。,不是所有的服务都支持Type=notify。要使用这个类型,服务本身必须被设计为能够发送这些状态更新消息。默认未注释.
Type=simple
WorkingDirectory=/usr/local
#User=minio-user
#Group=minio-user
#自带的用户名即使系统添加了minio-user,minio系统启动不成功,只能使用root启动成功.默认未注释,此处需要注释
ProtectProc=invisible
EnvironmentFile=-/etc/default/minio
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=1048576
# Turn-off memory accounting by systemd, which is buggy.
MemoryAccounting=no
# Specifies the maximum number of threads this process can create
TasksMax=infinity
# Disable timeout logic and wait until process is stopped
TimeoutSec=infinity
SendSIGKILL=no
[Install]
WantedBy=multi-user.target