Windows deployment minio is registered as a service and keeps running in the background
Recently I was using minio for resource storage and required minio to be deployed on wondows. I found the official running command: .\minio.exe server .\data. After running, close the cmd window and the service will be closed.
Therefore, it is necessary to register minio as a service operation through winsw registration service
Winsw download configuration:
- Address: https://github.com/winsw/winsw/releases
- Copy WinSW.exe to a customized directory and rename it to the service name you want to name minio-server.exe
- Create minio-server.xml in the same directory. Special attention, xml and exe must have the same name
- Configure the minio-server.xml file
- Use minio-server.exe install to install the service
- After installation, go to the service to start the service. After successful startup, you can use minio normally
- Use minio-server.exe uninstall to uninstall the service
Specific placement:
<service>
<id>minio-server</id>
<name>minio-server</name>
<description>minio文件存储服务器</description>
<!-- 可设置环境变量 -->
<env name="HOME" value="%BASE%"/>
<executable>%BASE%\minio.exe</executable>
<arguments>server "%BASE%\data"</arguments>
<!-- <logmode>rotate</logmode> -->
<logpath>%BASE%\logs</logpath>
<log mode="roll-by-size-time">
<sizeThreshold>10240</sizeThreshold>
<pattern>yyyyMMdd</pattern>
<autoRollAtTime>00:00:00</autoRollAtTime>
<zipOlderThanNumDays>5</zipOlderThanNumDays>
<zipDateFormat>yyyyMMdd</zipDateFormat>
</log>
</service>
Directory Structure:
service: