consul

安装

cd /usr/local/src

wget https://releases.hashicorp.com/consul/1.10.0/consul_1.10.0_linux_amd64.zip

unzip consul_1.10.0_linux_amd64.zip -d /usr/local/src/consul

# 创建系统服务
vim /lib/systemd/system/consul.service

配置启动服务

[Unit]
Description=consul
[Service]
ExecStart=/usr/local/src/consul/consul agent -dev -ui -config-dir /usr/local/src/consul/config
KillSignal=SIGINT

创建配置文件

创建配置文件
vim /usr/local/src/consul/config/server.json
{
"data_dir": "/usr/local/src/consul/data",
"log_level": "INFO",
"node_name": "192.168.200.161",
"server": true,
"bootstrap_expect": 1,
"client_addr": "0.0.0.0",
"advertise_addr": "192.168.211.128",
"advertise_addr_wan": "192.168.211.128"
}
启动
systemctl start consul

查看ui管理界面


image.png

windows

consul agent -dev -client=0.0.0.0

你可能感兴趣的:(consul)