配置Zookeper
在整个的codis架构之中,codis-proxy将作为所有的codis-server的对外的代理,而在整个的处理之中,codis-proxy所保存的数据一定是所有的codis-server的信息,那么这些信息都会保存在zookeeper的组件里面,所以现在需要在"codis-proxy-60"的主机上配置zookeeper组件,现在的配置是在单机下进行。
1、将zookeeper-3.4.9.tar.gz上传到60环境中,进行解压
$ tar -zxvf zookeeper-3.4..tar.gz
2、设置环境变量
在/etc/profile文件中添加如下红色信息
ZOOKEEPER_HOME=/home/xm6f/dev/zookeeper-3.4.9
export PATH=$PATH:$JAVA_HOME/bin:$MYCAT_HOME/bin:$GOROOT/bin:$GOPATH/bin:$ZOOKEEPER_HOME/bin
export ZOOKEEPER_HOME
3、建立zookeeper的数据保存路径
$ mkdir -p /usr/data/zookeeper
4、修改zookeeper配置文件
配置文件存放在$ZOOKEEPER_HOME/conf/目录下,将zoo_sample.cfd文件名称改为zoo.cfg, 缺省的配置内容如下:
# The number of milliseconds of each tick
tickTime=
# The number of ticks that the initial
# synchronization phase can take
initLimit=
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/usr/data/zookeeper
# the port at which the clients will connect
clientPort=
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=
#
# Be sure to read the maintenance section of the
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=
# Purge task interval in hours
# Set to "" to disable auto purge feature
#autopurge.purgeInterval=
配置说明:
tickTime:这个时间是作为 Zookeeper 服务器之间或客户端与服务器之间维持心跳的时间间隔,也就是每个 tickTime 时间就会发送一个心跳。
dataDir:顾名思义就是 Zookeeper 保存数据的目录,默认情况下,Zookeeper 将写数据的日志文件也保存在这个目录里。
clientPort:这个端口就是客户端连接 Zookeeper 服务器的端口,Zookeeper 会监听这个端口,接受客户端的访问请求。
5、启动zookeeper
当这些配置项配置好后,你现在就可以启动zookeeper了:
$ cd /home/xm6f/dev/zookeeper-3.4./bin/
$ ./zkServer.sh start
$ netstat -anp|grep #查看zookeeper端口
$ lsof -i: #查看某个端口是否被占用
$ ./zkServer.sh stop
配置Zookeper的更多相关文章
- .Net配置中心-Zookeper版
简介 zookeeper的基本概念和作用这里不做介绍,现在很多的公司都在使用它,说起它的作用,可能最先想到的是配置中心,可以将配置项作为一个node存储在zookeeper中,其他应用可以“关注 ...
- activemq+Zookeper高可用集群方案配置
在高并发.对稳定性要求极高的系统中,高可用的是必不可少的,当然ActiveMQ也有自己的集群方案.从ActiveMQ 5.9开始,ActiveMQ的集群实现方式取消了传统的Master-Slave方式 ...
- sqoop1.4.6配置安装
1.下载sqoop1.4.6 2.配置环境变量. 3.复制sqoop/conf/sqoop-env-template.sh为sqoop-env.sh 添加相关的配置 #Setpath to where ...
- HyperLedger Fabric基于zookeeper和kafka集群配置解析
简述 在搭建HyperLedger Fabric环境的过程中,我们会用到一个configtx.yaml文件(可参考Hyperledger Fabric 1.0 从零开始(八)--Fabric多节点集群 ...
- dubbo注册中心zookeeper出现异常 Opening socket connection to server 10.70.42.99/10.70.42.99:2181. Will not attempt to authenticate using SASL (无法定位登录配置)
linux下,zookeeper安装并启动起来了 DEMO时,JAVA控制台出现: INFO 2014-03-06 09:48:41,276 (ClientCnxn.java:966) - Openi ...
- sqoop安装配置
下载 sqoop-1.4.5 安装包 配置 sqoop-env.sh #Set path to where bin/hadoop is available 配置Hadoop export HADOOP ...
- hadoop生态搭建(3节点)-17.sqoop配置_单节点
# ==================================================================安装 sqoop tar -zxvf ~/sqoop-1.4.7 ...
- Sqoop 1.4.6 安装配置
配置环境变量 # SQOOP SQOOP_HOME=/home/hadoop/development/src/sqoop-1.4.6-cdh5.6.0 PATH=$PATH:$SQOOP_HOME/b ...
- cdh版本的sqoop安装以及配置
sqoop安装需要提前安装好sqoop依赖:hadoop .hive.hbase.zookeeper hadoop安装步骤请访问:http://www.cnblogs.com/xningge/arti ...
随机推荐
- 图片轮滚形式A
思想解读: 一共有5幅图片,初始时只显示一幅,其余四幅隐藏.然后使用trigger设置右下角的点击事件,根据点击的索引显示某幅图片.原理不算复杂. 结论: trigger的使用,模拟点击 层淡入淡出函 ...
- Matlab作图
修改线宽 plot(x,y,'LineWidth',1.5) 在xlabel,ylabel,title中使用latex语言 xlabel('$x$','interpreter','latex') yl ...
- hdu 4135 [a,b]中n互质数个数+容斥
http://acm.hdu.edu.cn/showproblem.php?pid=4135 给定一个数n,求某个区间[a,b]内有多少数与这个数互质. 对于一个给定的区间,我们如果能够求出这个区间内 ...
- bootstrap1.2
<html> <head> <meta charset="UTF-8"> <title></title> ...
- AngularJS AOP 实例
AngularJS有种机制叫做拦截器(interceptor),它是$http扩展点,类似ASP.NET MVC的过滤器filter机制,对每个$http请求的发送和接收过程进行过滤. $httpPr ...
- 三、winForm-DataGridView操作——DataGridView 操作复选框checkbox
一.添加复选框 ArrayList arr = new ArrayList(); public string checkboxName = "选择"; void StandLibW ...
- C# windform 使用TreeGridView
1 下载 treeGridView.DLL库文件. 2 添加到工程中. 右键“工具箱”选择“选择项” 弹出对话框 选择“浏览” 选中下载还的dll库文件.完成后工具箱中会有 treeGridView控 ...
- ASP.NET MVC 实现有论坛功能的网站(有iis发布网站)
ASP.NET MVC. M 为Model模型层, V 为View视图层, C 为Controller控制层.要想使用MVC框架来写网站就需要了解M V C 的作用分别为哪些.给大家简单的介绍一下: ...
- sudo: 没有终端存在,且未指定 askpass 程序
问题:sudo: 没有终端存在,且未指定 askpass 程序 解决: sudo visudo 增加如下一行: neutron ALL=(ALL) NOPASSWD:ALL
- 【文文殿下】P3737 [HAOI2014]遥感监测
题解 显然可以把每个观测点,认为是x轴上的一段区间.问题就转换为了:对于x轴上的若干个区间,选取尽可能少的点,使得所有区间都有至少一个点. 这是一个相当经典的贪心问题. 代码如下: #include& ...