一、启动
启动server端
nohup ./consul agent -config-dir=/opt/consul/config &
配置文件/opt/consul/confg.json的具体内容为:
{ "bootstrap_expect": 1, "data_dir": "/opt/consul/data", "log_level": "INFO", "node_name": "test-106_15_250_149", "bind_addr": "172.18.144.6", "client_addr": "0.0.0.0", "ui": true, "server": true, "log_file":"/opt/consul/log/", "log_rotate_bytes":100000000, "log_rotate_duration":"24h" }
参数描述:
"server": true 表示是以服务端启动 "bind-addr": "172.18.144.6" 表示绑定到哪个ip,是一个内网ip
"client_addr": "0.0.0.0" 指定客户端访问的ip,0.0.0.0表示不限客户端ip 3 4 5 6 7 8 9 10 11 12 13 14 15
标签:opt,log,ip,consul,集群,0.0,节点,addr From: https://www.cnblogs.com/yucongblog/p/17832103.html