Windows deployment minio is registered as a service and keeps running in the background

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:

  1. Address: https://github.com/winsw/winsw/releases
  2. Copy WinSW.exe to a customized directory and rename it to the service name you want to name minio-server.exe
  3. Create minio-server.xml in the same directory. Special attention, xml and exe must have the same name
  4. Configure the minio-server.xml file
  5. Use minio-server.exe install to install the service
  6. After installation, go to the service to start the service. After successful startup, you can use minio normally
  7. 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:

Guess you like

Origin blog.csdn.net/Tom_sensen/article/details/111595157