Consul的安装启动比较简单易行, 下面演示下linux 环境下操作
- 下载consul 包
wget https://releases.hashicorp.com/consul/0.6.2/consul_0.6.2_linux_amd64.zip
- 解压consul包
unzip consul_0.6.2_linux_amd64.zip
- 配置文件夹 修改环境变量
mkdir consul1
mv consul consul1/
mv consul1/ consul
vim ~/.bash_profile
PATH=$PATH:/opt/soft/consul
export PATH
source ~/.bash_profile
- 启动consul
consul agent -server -bootstrap-expect 1 -data-dir /tmp/consul -node=10.0.40.159
- 验证
ps -ef | grep java
consul members