Consul的安裝啟動比較簡單易行, 下面演示下linux 環(huán)境下操作
- 下載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
- 配置文件夾 修改環(huán)境變量
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