Consul安装
Consul 服务注册中心。
目录
安装
1 | wget https://releases.hashicorp.com/consul/1.2.2/consul_1.2.2_linux_amd64.zip |
配置
编辑web.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23{
"datacenter": "dc",
"node_name": "node0",
"server": true,
"client_addr": "0.0.0.0",
"addresses": {
"http": "0.0.0.0"
},
"ports": {
"dns": 8600,
"http": 8500,
"https": -1,
"serf_lan": 8301,
"serf_wan": 8302,
"server": 8300
},
"bind_addr": "0.0.0.0",
"log_level": "INFO",
"retry_interval": "30s",
"ui": true,
"disable_update_check": true,
"bootstrap_expect": 3
}
Systemd 配置
1 | mv consul /usr/local/bin |
编辑/etc/systemd/system/consul.service
1 | [Unit] |