zookeeper 독립 실행형 배포

3072 단어 빅데이터 학습
서버 1대: 4C8G 홈페이지 다운로드 주소:
https://www.apache.org/dyn/closer.lua/zookeeper/zookeeper-3.6.1/apache-zookeeper-3.6.1-bin.tar.gz

selinux 닫기
sed -i '7s#enforcing#disabled#g' /etc/selinux/config
setenforce 0

방화벽을 닫다
systemctl disable firewalld.service
systemctl stop firewalld.service

다운로드 소스 최적화
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

필요한 소프트웨어 패키지 설치
yum install wget vim -y

zookeeper 다운로드
wget https://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.6.1/apache-zookeeper-3.6.1-bin.tar.gz

/usr/local 아래로 압축 풀기
tar xf apache-zookeeper-3.6.1-bin.tar.gz -C /usr/local/

Java 다운로드
 :https://www.oracle.com/java/technologies/javase-jdk14-downloads.html
wget https://download.oracle.com/otn-pub/java/jdk/14.0.1+7/664493ef4a6946b186ff29eb326336a2/jdk-14.0.1_linux-x64_bin.tar.gz?AuthParam=1592647377_1b13524ed11ea1e651cf2709e0d61ce2

다운로드한 파일이 약간...
[root@localhost ~]# ls
anaconda-ks.cfg  apache-zookeeper-3.6.1-bin.tar.gz  jdk-14.0.1_linux-x64_bin.tar.gz?AuthParam=1592647377_1b13524ed11ea1e651cf2709e0d61ce2

이름 바꾸기
mv jdk-14.0.1_linux-x64_bin.tar.gz\?AuthParam\=1592647377_1b13524ed11ea1e651cf2709e0d61ce2 jdk-14.0.1_linux-x64_bin.tar.gz

압력을 풀다
tar xf jdk-14.0.1_linux-x64_bin.tar.gz -C /usr/local/

환경 변수 추가
vim /etc/profile
 (JAVA_HOME java )
# java
export JAVA_HOME=/usr/local/jdk-14.0.1
export CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export PATH=$PATH:${JAVA_HOME}/bin

source /etc/profile
#  
[root@localhost local]# java -version
java version "14.0.1" 2020-04-14
Java(TM) SE Runtime Environment (build 14.0.1+7)
Java HotSpot(TM) 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)

Java 설치 zookeeper 구성 수정 완료
cd /usr/local/apache-zookeeper-3.6.1-bin/conf
cp zoo_sample.cfg zoo.cfg
vim zoo.cfg
#  :
server.1=localhost:2888:3888
# localhost IP
cd ..
./bin/zkServer.sh start

시작 여부 확인
[root@localhost apache-zookeeper-3.6.1-bin]# ./bin/zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/apache-zookeeper-3.6.1-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost.
Mode: standalone

환경 변수 추가
[root@localhost conf]# vim /etc/profile
# 
# zookeeper
export ZK_HOME=/usr/local/apache-zookeeper-3.6.1-bin
export PATH=$PATH:${ZK_HOME}/bin

[root@localhost conf]# source /etc/profile
#    
[root@localhost conf]# zkServer.sh status
ZooKeeper JMX enabled by default
Using config: /usr/local/apache-zookeeper-3.6.1-bin/bin/../conf/zoo.cfg
Client port found: 2181. Client address: localhost.
Mode: standalone

좋은 웹페이지 즐겨찾기