consul启动方式
在实际项目中,使用supervisor管理应用,启动consul默认带参数:
consul agent -server -ui -bootstrap-expect=1 -data-dir=/tmp/consul -node=agent-one -advertise=127.0.0.1 -bind=0.0.0.0 -client=0.0.0.0
#-server:服务器模式
#-ui:能webui展示
#-bootstrap-expect:server为1时即选择server集群leader
#-data-dir:consul状态存储文件地址
#-node:指定结点名
#-advertise:本地ip地址
#-client:指定可访问这个服务结点的ip,0.0.0.0表示允许所有client访问