赞
踩
序号 | 软件 |
---|---|
1 | jdk-8u192-linux-x64.rpm |
2 | apache-zookeeper-3.6.3-bin.tar.gz |
内容 | 描述 |
---|---|
服务器IP | 192.168.16.128 |
安装位置 | /usr/local/apache-zookeeper |
conf文件 | /usr/local/apache-zookeeper/conf/ |
$ rpm -ivh jdk-8u192-linux-x64.rpm
$ vim /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_192-amd64
export JRE_HOME=$JAVA_HOME/jre
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin;
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
$ source /etc/profile
$ tar -zxvf apache-zookeeper-3.6.3-bin.tar.gz -C /usr/local/
$ cd/usr/local/ && mv apache-zookeeper-3.6.3-bin apache-zookeeper
$ vim /etc/hosts
192.168.16.128 zk-master
$ vim /etc/profile
export ZK_HOME=/usr/local/apache-zookeeper
export PATH=$ZK_HOME/bin:$PATH
$ source /etc/profile
# 创建数据存储目录
$ mkdir /usr/local/apache-zookeeper/data
$ cd /usr/local/apache-zookeeper/conf
$ cp zoo_sample.cfg zoo.cfg
$ vim zoo.cfg
# 修改数据存储目录
dataDir=/usr/local/apache-zookeeper/data/tmp/zookeeper
$ sh $ZK_HOME/bin/zkServer.sh start
$ sh $ZK_HOME/bin/zkServer.sh status
$ sh $ZK_HOME/bin/zkServer.sh stop
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。