BladeX/doc/consul/consul.md
2019-01-30 17:06:23 +08:00

46 lines
872 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 启动步骤
## 安装consul
下载地址https://www.consul.io/downloads.html
安装启动然后访问consul web端http://localhost:8500
## 安装mac
```bash
brew install consul
```
## 启动
### 命令方式:
```bash
consul agent -server -bootstrap -bind 127.0.0.1 -client 0.0.0.0 -data-dir ./data -ui -datacenter=blade
```
### brew服务
> 修改consul启动参数
```bash
vim /usr/local/opt/consul/homebrew.mxcl.consul.plist
```
> 修改ProgramArguments部分
```html
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/consul/bin/consul</string>
<string>agent</string>
<string>-server</string>
<string>-bootstrap</string>
<string>-advertise</string>
<string>127.0.0.1</string>
<string>-data-dir</string>
<string>./data</string>
<string>-ui</string>
</array>
```
> 启动:
```bash
brew services start consul
```