winsw安装Windows服务 1,下载安装:
https://github.com/winsw/winsw
2,将WinSW.exe复制到自定义的目录,并重命名为自己想命名的服务名称minio-server.exe。
3,同目录下创建minio-server.xml。特别注意,xml和exe必须同名
4,配置minio-server.xml文件
minio-server.xml文件:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 <service > <id > minio-server</id > <name > minio-server</name > <description > minio文件存储服务器</description > <env name ="HOME" value ="%BASE%" /> <env name ="MINIO_ROOT_USER" value ="admin123456" /> <env name ="MINIO_ROOT_PASSWORD" value ="admin123456" /> <executable > %BASE%\minio.exe</executable > <arguments > server "%BASE%\data" --console-address ":9001"</arguments > <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 >
5,安装服务
1 2 3 4 5 6 7 8 9 // 安装 D:\MinIO>minio-server install Installing service 'minio-server (minio-server)' ... Service 'minio-server (minio-server)' was installed successfully. // 卸载 需要停止服务 D:\MinIO>minio-server uninstall Uninstalling service 'minio-server (minio-server)' ... Service 'minio-server (minio-server)' was uninstalled successfully.
打开服务,启动 minio-server
。
目录结构如下:
验证安装 打开:http://localhost:9001
参考:
https://www.cnblogs.com/zys-blog/p/13164197.html