apache zookeeper的安装
original article:http://zookeeper.praveendeshmane.co.in/zookeeper/zookeeper-3-4-6-single-server-setup-on-ubuntu-14-04.jsp
---------------------------------------------------------
Apache ZooKeeper is a software project of the Apache Software Foundation. It is essentially a distributed hierarchical key-value store, which is used to provide a distributed configuration service, synchronization service, and naming registry for large distributed systems. ZooKeeper was a sub-project of Hadoop but is now a top-level project in its own right.
ZooKeeper's architecture supports high availability through redundant services. The clients can thus ask another ZooKeeper leader if the first fails to answer. ZooKeeper nodes store their data in a hierarchical name space, much like a file system or a tree data structure. Clients can read from and write to the nodes and in this way have a shared configuration service. Updates are totally ordered.
Pre Requirements
1) A machine with Ubuntu 14.04 LTS operating system
2) Apache Hadoop 2.6.4 pre installed (How to install Hadoop on Ubuntu 14.04)
3) Apache ZooKeeper 3.4.6 software (Download Here)
ZooKeeper 3.4.6 Single Server setup on Ubuntu
Installation Steps
Step 1 - Update. Open a terminal (CTRL + ALT + T) and type the following sudo command. It is advisable to run this before installing any package, and necessary to run it to install the latest updates, even if you have not added or removed any Software Sources.
$ sudo apt-get update
Step 2 - Installing Java 7.
$ sudo apt-get install openjdk-7-jdk
Step 3 - Edit $HOME/.bashrc file by adding the java path.
$ sudo gedit $HOME/.bashrc
$HOME/.bashrc file. Add the following lines
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
Step 4 - Reload your changed $HOME/.bashrc settings
$ source $HOME/.bashrc
Step 5 - Creating zookeeper directory.
$ sudo mkdir /usr/local/zookeeper
Step 6 - Change the ownership and permissions of the directory /usr/local/zookeeper. Here 'hduser' is an Ubuntu username.
$ sudo chown -R hduser /usr/local/zookeeper
$ sudo chmod -R 755 /usr/local/zookeeper
Step 7 - Creating /zookeeper/data directory.
$ sudo mkdir /usr/local/zookeeper/data
Step 8 - Change the ownership and permissions of the directory /usr/local/zookeeper/data. Here 'hduser' is an Ubuntu username.
$ sudo chown -R hduser /usr/local/zookeeper/data
$ sudo chmod -R 755 /usr/local/zookeeper/data
Step 9 - Creating /zookeeper/log directory.
$ sudo mkdir /usr/local/zookeeper/log
Step 10 - Change the ownership and permissions of the directory /usr/local/zookeeper/log. Here 'hduser' is an Ubuntu username.
$ sudo chown -R hduser /usr/local/zookeeper/log
$ sudo chmod -R 755 /usr/local/zookeeper/log
Step 11 - Change the directory to /home/hduser/Desktop , In my case the downloaded zookeeper-3.4.6.tar.gz file is in /home/hduser/Desktop folder. For you it might be in /downloads folder check it.
$ cd /home/hduser/Desktop/
Step 12 - Untar the zookeeper-3.4.6.tar.gz file.
$ tar xzf zookeeper-3.4.6.tar.gz
Step 13 - Move the contents of zookeeper-3.4.6 folder to /usr/local/zookeeper
$ mv zookeeper-3.4.6/* /usr/local/zookeeper
Step 14 - Change the directory to /usr/local/zookeeper/conf
$ cd /usr/local/zookeeper/conf
Step 15 - Edit zoo.cfg file. If this file doesn't exists it will create one for you and it ll open for you to edit.
$ gedit zoo.cfg
Step 16 - Add following lines to zoo.cfg file. Save and close.
tickTime=2000
dataDir=/usr/local/zookeeper/data
dataLogDir=/usr/local/zookeeper/log
clientPort=2181
initLimit=5
syncLimit=2
Step 17 - Change the directory to /usr/local/zookeeper/bin
$ cd /usr/local/zookeeper/bin
Step 18 - Start zookeeper server
$ ./zkServer.sh start
Step 19 - Start client
$ ./zkCli.sh -server 127.0.0.1:2181
Step 20 - Stop zookeeper server
$ ./zkServer.sh stop
Please share this blog post and follow me for latest updates on
apache zookeeper的安装的更多相关文章
- Apache Zookeeper 使用-安装
Apache Zookeeper 使用-安装 官方网站 https://zookeeper.apache.org/ 官方文档 下载地址 Zookeeper 是什么? ZooKeeper is a ce ...
- 决战大数据之三-Apache ZooKeeper Standalone及复制模式安装及测试
决战大数据之三-Apache ZooKeeper Standalone及复制模式安装及测试 [TOC] Apache ZooKeeper 单机模式安装 创建hadoop用户&赋予sudo权限, ...
- windows下安装apache zookeeper
ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件.它是一个为分布式应用提供一致性服务的软件,提供的功 ...
- 在 Linux 多节点安装配置 Apache Zookeeper 分布式集群
规划: 三台物理服务器就形成了(法定人数).对于高可用性集群,您可以使用高于3的任何奇数.例如,如果设置5台服务器,则集群可以处理两个故障节点等. 物理服务器需要开启的端口 2888 , 3888 和 ...
- zookeeper-3.5.5安装报错:找不到或无法加载主类 org.apache.zookeeper.server.quorum.QuorumPeerMain
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/jiangxiulilinux/artic ...
- (原) 1.1 Zookeeper单机安装
本文为原创文章,转载请注明出处,谢谢 zookeeper 单机安装配置 1.安装前准备 linux系统(此文环境为Centos6.5) Zookeeper安装包,官网https://zookeeper ...
- 初识zookeeper(一)之zookeeper的安装及配置
1.简要介绍 zookeeper是一个分布式的应用程序协调服务,是Hadoop和Hbase的重要组件,是一个树型的目录服务,支持变更推送.除此还可以用作dubbo服务的注册中心. 2.安装 2.1 下 ...
- zookeeper[4] 安装windows zookeeper,及问题处理
安装步骤: 1.在如下路径下载zookeeper-3.4.7.tar.gz http://mirrors.cnnic.cn/apache/zookeeper/stable/ 2.解压zookeeper ...
- ZooKeeper的安装、配置、启动和使用(一)——单机模式
ZooKeeper的安装.配置.启动和使用(一)——单机模式 ZooKeeper的安装非常简单,它的工作模式分为单机模式.集群模式和伪集群模式,本博客旨在总结ZooKeeper单机模式下如何安装.配置 ...
随机推荐
- MyBatis Generator实现MySQL分页插件
MyBatis Generator是一个非常方便的代码生成工具,它能够根据表结构生成CRUD代码,可以满足大部分需求.但是唯一让人不爽的是,生成的代码中的数据库查询没有分页功能.本文介绍如何让MyBa ...
- Vue.js经典开源项目汇总-前端参考资源
Vue.js经典开源项目汇总 原文链接:http://www.cnblogs.com/huyong/p/6517949.html Vue是什么? Vue.js(读音 /vjuː/, 类似于 view) ...
- 【知识总结】多项式全家桶(二)(ln和exp)
上一篇:[知识总结]多项式全家桶(一)(NTT.加减乘除和求逆) 一.对数函数\(\ln(A)\) 求一个多项式\(B(x)\),满足\(B(x)=\ln(A(x))\). 这里需要一些最基本的微积分 ...
- 服务器上oracle的监听设置
1.查看本机的计算机名 2.修改etc/host 3.修改oracle的listener.ora(我服务器上的路径:) 4.修改tnsnames.ora(和上边文件一个目录)
- ACM_Ruin of Titanic(简单贪心)
Ruin of Titanic Time Limit: 2000/1000ms (Java/Others) Problem Description: 看完Titanic后,小G做了一个梦.梦见当泰坦尼 ...
- 自动保存草稿 asp+ajax自动存稿功能详解(转自影子)
自动保存草稿功能的原理 我们都知道网页是一种无状态的,每次都需要请求,响应,当一次请求完成后就与服务器断开连接了,所以我们不能像网页一样实现实时的交互功能,但是为了满足更多的需求一个比较无敌的程序员还 ...
- DeltaFish 校园物资共享平台 第八次小组会议
DeltaFish 校园物资共享平台 第八次小组会议 记录人:娄雨禛 2018.7.31 会议总结 1. 对前端界面进行改进,具体改进内容如下: 2. 后端从登录和注册的具体实现做起,熟悉流程之后完成 ...
- [Windows Server 2008] Serv-U安全设置
★ 欢迎来到[护卫神·V课堂],网站地址:http://v.huweishen.com ★ 护卫神·V课堂 是护卫神旗下专业提供服务器教学视频的网站,每周更新视频. ★ 本节我们将带领大家:Serv- ...
- WCF开发的流程-服务端和客户端之间的通讯(内含demo讲解)
讲解技术之前,恳请博友让我说几句废话.今天是我第一在博客园发布属于自己原创的博文(如有雷同,那是绝对不可能的事,嘿嘿).之前一直是拜读各位博友的大作,受益匪浅的我在这对博友们说声谢谢,谢谢你们的共享! ...
- docloud后台管理项目(前端篇)
以下内容与主题无关,如果不想看可以直接忽视 !--忽视开始--! 给大家推荐一款强大的编辑器,那就是集响应快.体验好.逼格高.功能丰富为一体的sublime text 3.它除了以上特点,还有一个最重 ...