Avatar 我的惆怅几时荡漾起微恙的涟漪
于风中,于梦里,化作尘泥落红,只余香如故。

macOS brew install consul


安装Consul

  brew install consul

配置Consul启动项

  vim /usr/local/opt/consul/homebrew.mxcl.consul.plist
  <?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>KeepAlive</key>
        <dict>
        <key>SuccessfulExit</key>
        <false/>
        </dict>
        <key>Label</key>
        <string>homebrew.mxcl.consul</string>
        <key>ProgramArguments</key>
        <array>
        <string>/usr/local/opt/consul/bin/consul</string>
        <string>agent</string>
        <string>-server</string>
        <string>-bind</string>
        <string>127.0.0.1</string>
        <string>-data-dir</string>
        <string>./data</string>
        <string>-ui</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>WorkingDirectory</key>
        <string>/usr/local/var</string>
        <key>StandardErrorPath</key>
        <string>/usr/local/var/log/consul.log</string>
        <key>StandardOutPath</key>
        <string>/usr/local/var/log/consul.log</string>
    </dict>
    </plist>

重启Consul

  brew services restart consul

all tags