CentOS7安装Consul集群
2017-05-10 13:25
316 查看
1、准备4台服务器
linux1 192.168.56.101
linux2 192.168.56.102
linux3 192.168.56.103
linux4 192.168.56.104
2、下载并解压Consul文件,拷贝到/usr/local/bin目录下
3、启动Consul集群
4、将节点加入consul集群
5、查看集群
6、查看ui
参考文档:http://www.bbsmax.com/A/Gkz1X3QrdR/
http://consul.la/docs
linux1 192.168.56.101
linux2 192.168.56.102
linux3 192.168.56.103
linux4 192.168.56.104
2、下载并解压Consul文件,拷贝到/usr/local/bin目录下
[root@linux1 ~]# wget https://releases.hashicorp.com/consul/0.8.1/consul_0.8.1_linux_amd64.zip?_ga=2.37003621.454120034.1493952927-625263640.1493952912 #解压下载的Consul,如果没有安装unzip的话可以先安装:yum install zip unzip [root@linux1 ~]# unzip consul_0.8.1_linux_amd64.zip #拷贝文件到bin目录下 [root@linux1 ~]# mv consul /usr/local/bin
3、启动Consul集群
以server模式启动consul [root@linux1 ~]# consul agent -server -bootstrap-expect=3 -data-dir=/tmp/consul -node=consul1 -bind=192.168.56.101 -dc=dc1 -ui [root@linux2 ~]# consul agent -server -bootstrap-expect=3 -data-dir=/tmp/consul -node=consul2 -bind=192.168.56.102 -dc=dc1 [root@linux3 ~]# consul agent -server -bootstrap-expect=3 -data-dir=/tmp/consul -node=consul3 -bind=192.168.56.103 -dc=dc1 以client模式启动consul [root@linux4 ~]# consul agent -data-dir=/tmp/consul -node=consul4 -bind=192.168.56.104 -dc=dc -server 表示是server模式 -bootstrap-expect=2 表示是集群中有2台服务器 bootstrap该模式node可以指定自己作为leader ,如果是非leader可不加该参数 -data-dir=/tmp/consul 目录 -node=n2 该服务器节点名 -bind=192.168.56.101 节点绑定的ip -ui 非必须 webui的路径 用web来管理consul -dc=dc1 集群的名称
4、将节点加入consul集群
[root@linux2]# consul join 192.168.56.101 [root@linux3]# consul join 192.168.56.101 [root@linux4]# consul join 192.168.56.101 或者 [root@linux1]# consul join 192.168.56.102 192.168.56.103 192.168.56.104
5、查看集群
[root@linux1]# consul members
6、查看ui
参考文档:http://www.bbsmax.com/A/Gkz1X3QrdR/
http://consul.la/docs
相关文章推荐
- CentOS7 安装Hadoop集群环境
- centos7安装redis-3.0.4集群
- consul集群环境安装
- [置顶] CentOS7安装配置zookeeper集群
- Centos7安装Redis-3.2.5集群
- centos7安装hadoop1.2.1分布式集群
- Centos7下安装redis实战(单机版以及集群)
- Centos7环境ElasticSearch5.2.2集群安装
- CentOS7安装、配置MariaDB集群问题总结
- Centos7中安装Redis3.2.3集群
- consul的安装配置 一centos7环境
- Centos7安装mariadb galera cluster数据库集群 & 详解
- linux服务器(centos7)Apache+Tomcat 安装配置以及集群实现(上)
- Centos7安装Redis集群
- centos7(vm)下hadoop2.7.2完全分布式安装验证(x86)-hadoop3节点集群(2副本)
- centos7 安装hadoop 集群遇到的问题
- centos7下安装编译并搭建hadoop2.6.0单节点伪分布式集群
- 【elasticsearch】(2)centos7 超简单安装elasticsearch 的监控、测试的集群工具elasticsearch head
- Centos7搭建redis集群及安装sentinel
- centos7安装consul