在 CentOS7 上安装 zookeeper-3.5.2 服务
[root@centos-linux src]# pwd
/usr/local/src # 1、创建 /usr/local/src/zookeeper 文件夹
[root@centos-linux src]# mkdir -p /usr/local/src/zookeeper # 2、进入到 /usr/local/src/zookeeper 目录中
[root@centos-linux src]# cd /usr/local/src/zookeeper # 3、下载 zookeeper-3.5.2-alpha.tar.gz
[root@centos-linux zookeeper]# wget http://mirrors.shu.edu.cn/apache/zookeeper/zookeeper-3.5.2-alpha/zookeeper-3.5.2-alpha.tar.gz
---- ::-- http://mirrors.shu.edu.cn/apache/zookeeper/zookeeper-3.5.2-alpha/zookeeper-3.5.2-alpha.tar.gz
正在解析主机 mirrors.shu.edu.cn (mirrors.shu.edu.cn)... 202.121.199.235
正在连接 mirrors.shu.edu.cn (mirrors.shu.edu.cn)|202.121.199.235|:... 已连接。
已发出 HTTP 请求,正在等待回应... OK
长度: (18M) [application/x-gzip]
正在保存至: “zookeeper-3.5.-alpha.tar.gz” %[=========================================================================>] ,, 126KB/s 用时 2m 24s -- :: ( KB/s) - 已保存 “zookeeper-3.5.-alpha.tar.gz” [/]) #4、解压缩 zookeeper-3.5.2-alpha.tar.gz
[root@centos-linux zookeeper]# tar -zxvf zookeeper-3.5.-alpha.tar.gz #5、进入到 /usr/local/src/zookeeper/zookeeper-3.5.2-alpha/conf 目录中
[root@centos-linux zookeeper]# cd zookeeper-3.5.-alpha/conf
[root@centos-linux conf]# ls
configuration.xsl log4j.properties zoo_sample.cfg # 6、复制 zoo_sample.cfg 文件的并命名为为 zoo.cfg
[root@centos-linux conf]# cp zoo_sample.cfg zoo.cfg
[root@centos-linux conf]# ls
configuration.xsl log4j.properties zoo.cfg zoo_sample.cfg # 7、用 vim 打开 zoo.cfg 文件并修改其内容为如下
[root@centos-linux conf]# vim zoo.cfg # dataDir=/tmp/zookeeper
# 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=/tmp/zookeeper
#数据文件夹
dataDir=/urs/local/src/zookeeper/zookeeper-3.5.2-alpha/data
#日志文件夹
dataLogDir=/urs/local/src/zookeeper/zookeeper-3.5.2-alpha/logs
# 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.
# # 8、保存并关闭 zoo.cfg 文件
[root@centos-linux conf]# cd ..
[root@centos-linux zookeeper-3.5.-alpha]# cd bin
[root@centos-linux bin]# ls
README.txt zkCleanup.sh zkCli.cmd zkCli.sh zkEnv.cmd zkEnv.sh zkServer.cmd zkServer-initialize.sh zkServer.sh #9、用 vim 打开 /etc/ 目录下的配置文件 profile
[root@centos-linux bin]# vim /etc/profile #10、并在其尾部追加如下内容
# idea - zookeeper-3.5.2 config start - 2017-04-20 export ZOOKEEPER_HOME=/usr/local/src/zookeeper/zookeeper-3.5.2-alpha/
export PATH=$ZOOKEEPER_HOME/bin:$PATH
export PATH
# idea - zookeeper-3.5.2 config end - 2017-04-20 # 11、使 /etc/ 目录下的 profile 文件即可生效
[root@centos-linux bin]# source /etc/profile # 12、启动 zookeeper 服务
[root@centos-linux bin]# zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED #13、查询 zookeeper 状态
[root@centos-linux bin]# zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Client port found: . Client address: localhost.
Mode: standalone # 14、关闭 zookeeper 服务
[root@centos-linux bin]# zkServer.sh stop
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
[root@centos-linux bin]# zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED # 15、重启 zookeeper 服务
[root@centos-linux bin]# zkServer.sh restart
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
ZooKeeper JMX enabled by default
Using config: /usr/local/src/zookeeper/zookeeper-3.5.-alpha/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
在 CentOS7 上安装 zookeeper-3.5.2 服务的更多相关文章
- 如何在Centos7上安装zookeeper 多实例
一.如何在Centos7上安装zookeeper 多实例 cd /usr/local/src/ wget https://mirrors.tuna.tsinghua.edu.cn/apache/zoo ...
- centos7上安装zookeeper
centos7上安装zookeeper 1 准备工作 1.准备服务器,本次安装采用 centos7系统.内存2G.存储60G的虚拟机服务器一台: 2.服务器安装java环境: 参考文章<cent ...
- 在 CentOS7 上安装 Zookeeper服务
1.创建 /usr/local/services/zookeeper 文件夹: mkdir -p /usr/local/services/zookeeper 2.进入到 /usr/local/serv ...
- 在CentOS7上安装ftp服务器用于保存服务端上传的图片。
1.CentOS卸载vsftpd的方法 如果服务器上已经安装了vsftpd服务,配置出错需要卸载vsftpd服务. 1.1 查找vsftpd服务 [root@localhost /]# rpm -aq ...
- 在CentOS7上安装和使用ZooKeeper最新版本(V3.4.12)
0.ZooKeeper文档 http://zookeeper.apache.org/doc/r3.4.11/zookeeperOver.html 1.准备 在CentOS7上安装zookeeper时, ...
- 在 CentOS7 上安装 zookeeper-3.4.9 服务
在 CentOS7 上安装 zookeeper-3.4.9 服务 1.创建 /usr/local/services/zookeeper 文件夹: mkdir -p /usr/local/service ...
- 在CentOS7上安装JDK1.8
在CentOS7上安装JDK1.8 1 通过 SecureCRT 连接到阿里云 CentOS7 服务器: 2 进入到目录 /usr/local/ 中: cd /usr/local/ 3 创建目录 to ...
- Linux上安装Zookeeper以及一些注意事项
最近打算出一个系列,介绍Dubbo的使用. 分布式应用现在已经越来越广泛,Spring Could也是一个不错的一站式解决方案,不过据我了解国内目前貌似使用阿里Dubbo的公司比较多,一方面这个框架也 ...
- centos7下安装zookeeper&zookeeper集群的搭建
一.centos7下安装zookeeper 1.zookeeper 下载地址 https://mirrors.tuna.tsinghua.edu.cn/apache/zookeeper/ 2.安装步骤 ...
- 在centos7上安装Jenkins
在centos7上安装Jenkins 安装 添加yum repos,然后安装 sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins ...
随机推荐
- ifconfig-dropped
drop的包是因为网卡的buffer满了 查看当前网卡的buffer size情况 ethtool -g eth0 Ring parameters for eth0: Pre-set maximums ...
- 浅谈Express的put与del
假设有一个景区价格列表页,显示当前的价目表. 价目表存放在express应用的数组中: var tours = [ {id:0,name:'Hood River',price:99.99}, {id: ...
- POJ 1125
#include<iostream> #include<stdio.h> #define MAXN 102 #define inf 100000000 using namesp ...
- spring基础回顾
1.什么是Spring框架?Spring框架有哪些主要模块? Spring框架是一个为Java应用程序的开发提供了综合.广泛的基础性支持的Java平台.Spring帮助开发者解决了开发中基础性的问题, ...
- IKAnalyzer 独立使用 配置扩展词典
有三点要注意(要不然扩展词典始终不生效): 后缀名.dic的词典文件,必须如使用文档里所说的 无BOM的UTF-8编码保存的文件.如果不确定什么是 无BOM的UTF-8编码,最简单的方式就是 用No ...
- Shell之expect的测试
测试:./sshLogin.sh Slave1 caipeichao 1qaz@WSX hadoop lk198981 HadoopCluster #!/usr/bin/expect -f #auto ...
- (转)一个MySQL 5.7 分区表性能下降的案例分析
一个MySQL 5.7 分区表性能下降的案例分析 原文:http://www.talkwithtrend.com/Article/216803 前言 希望通过本文,使MySQL5.7.18的使用者知晓 ...
- 【Java并发编程】:死锁
当线程需要同时持有多个锁时,有可能产生死锁.考虑如下情形: 线程A当前持有互斥所锁lock1,线程B当前持有互斥锁lock2.接下来,当线程A仍然持有lock1时,它试图获取lock2,因为线程B正持 ...
- linux中查找某端口,并关闭对应的端口
1,netstat -ntlp (n表示不反向域名杰斯 t表示查看tcp协议的连接 l查看正在监听端口 p获取进程号和端口) 2,然后直接kill -9 端口号 参考全文:https://linux ...
- 回退Ubuntu记录
前言 由于Ubuntu18经常出错,因而决定回退Ubuntu16,下面是记录回退问题及美化,以便以后需要. 问题总结 磁盘挂载 挂载其他磁盘分区时,提示错误"Metadata kept in ...