1.查看系统版本,选择下载方式
地址:https://www.consul.io/downloads

此次选择的是
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
sudo yum -y install consul

安装成功
2.检查版本信息
consul -v
3.启动(1)consul
最简单的启动命令,没有ui
consul agent -dev
4.启动(2)consul
#后台启动,不绑定ip
nohup consul agent -dev -ui -node=consul-dev -client=0.0.0.0 -data-dir=/consul/data >> /consul/logs/consul.log 2>&1 &
#客户端启动,不绑定ip
consul agent -dev -ui -node=consul-dev-14 -client=0.0.0.0
5.通过ui访问(ip+默认端口号:8500)

6.关闭consul
consul leave
或者
kill -9 PID