Consul 集群:server节点安装

安装

apt install consul -y #version (1.5.2+dfsg2-14)

以dev模式启动主节点

该模式不会持久化任何数据,方便开发测试。

$ consul agent -dev -bind 0.0.0.0

这时,Consul管理页面的8500端口还是只能在本地访问:

# ss -lntp | grep con
LISTEN    0         4096             127.0.0.1:8600             0.0.0.0:*        users:(("consul",pid=3355138,fd=10))
LISTEN    0         4096             127.0.0.1:8500             0.0.0.0:*        users:(("consul",pid=3355138,fd=11))
LISTEN    0         4096             127.0.0.1:8502             0.0.0.0:*        users:(("consul",pid=3355138,fd=12))
LISTEN    0         4096                     *:8300                   *:*        users:(("consul",pid=3355138,fd=3))
LISTEN    0         4096                     *:8301                   *:*        users:(("consul",pid=3355138,fd=7))
LISTEN    0         4096                     *:8302                   *:*        users:(("consul",pid=3355138,fd=5))

所以我们需要以下命令启动:

$ consul agent -dev -bind 0.0.0.0 -client 0.0.0.0

参数大全

https://www.cnblogs.com/sunsky303/p/9209024.html

posted @ 2023-02-10 15:36  develon  阅读(34)  评论(0编辑  收藏  举报