下载
wget https://releases.hashicorp.com/consul/1.4.2/consul_1.4.2_linux_amd64.zip
解压
unzip consul_1.4.2_linux_amd64.zip -d /usr/bin
创建启动文件
vim /lib/systemd/system/consul.service
[Unit]
Description=consul
[Service]
ExecStart=/usr/bin/consul agent -config-dir /etc/consul
KillSignal=SIGINT
创建配置文件
mkdir /etc/consul/
vim /etc/consul/server.json
{
"data_dir": "/tmp/consul",
"log_level": "INFO",
"node_name": "192.168.211.128",
"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

相关文章:

  • 2021-07-17
  • 2021-10-11
  • 2021-11-24
  • 2021-12-07
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-01
  • 2021-09-23
  • 2022-12-23
  • 2021-06-06
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案