Skip to content

Instantly share code, notes, and snippets.

@icyleaf
Last active July 9, 2020 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icyleaf/99468d0337f5e462aacd2ee01a80c44f to your computer and use it in GitHub Desktop.
Save icyleaf/99468d0337f5e462aacd2ee01a80c44f to your computer and use it in GitHub Desktop.

MinIO macOS 服务化脚本

把上面脚本放在 cd /usr/local/Cell/minio/xxxxx/ 目录,然后编辑,之后在运行

$ brew services start minio
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.minio</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/minio/bin/minio</string>
<string>server</string>
<string>--config-dir=/usr/local/etc/minio</string>
<string>--address=:9000</string>
<string>/path/to/data/storage</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>WorkingDirectory</key>
<string>/usr/local</string>
<key>StandardErrorPath</key>
<string>/usr/local/var/log/minio.log</string>
<key>StandardOutPath</key>
<string>/usr/local/var/log/minio.log</string>
<key>EnvironmentVariables</key>
<dict>
<key>MINIO_ACCESS_KEY</key>
<string>admin</string>
<key>MINIO_SECRET_KEY</key>
<string>password</string>
</dict>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment