从零部署CDH5.14.0(二)集群安装

 

一、配置同步脚本xsync,所有节点安装工具rsync

yum -y install xsync

以hadoop001为主节点,配置xsync

[root@hadoop001 ]# vi /usr/local/bin/xsync
#!/bin/sh
pcount=$#
if((pcount==0)); then
        echo no args...;
        exit;
fi

# 获取文件名称
p1=$1
fname=`basename $p1`
echo fname=$fname
# 获取上级目录到绝对路径
pdir=`cd -P $(dirname $p1); pwd`
echo pdir=$pdir
# 获取当前用户名称
user=`whoami`
# 循环
for((host=122; host<=126; host++)); do
        echo $pdir/$fname $user@192.168.122.$host:$pdir
        echo ==================slave$host==================
        rsync -rvl $pdir/$fname $user@192.168.122.$host:$pdir
done
[root@hadoop001 ]# chmod 777 /usr/local/bin/xsync

 

 

二、安装jdk1.8、配置mysql-connector-java.jar

[root@hadoop001 src]# mkdir /usr/java
[root@hadoop001 src]# tar xf jdk-8u91-linux-x64.tar.gz -C /usr/java/
[root@hadoop001 src]# tee -a /etc/profile <<-'EOF'
export JAVA_HOME=/usr/java/jdk1.8.0_91
export PATH=$JAVA_HOME/bin:$PATH
EOF

#分发jdk和profile
[root@hadoop001 src]# xsync /usr/java/jdk1.8.0_91
[root@hadoop001 src]# xsync /etc/profile
#所有节点执行
[root@hadoop001 src]# source /etc/profile
#验证
[root@hadoop001 src]# java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
[root@hadoop001 src]# mkdir /usr/share/java
[root@hadoop001 src]# cp mysql-connector-java-5.1.27-bin.jar /usr/share/java/
[root@hadoop001 src]# xsync /usr/share/java

 

 

三、hadoop001安装CM Server

[root@hadoop001 cm-server-5.14.0]# ll
总用量 716680
-rw-r--r-- 1 root root 733852448 5月  15 10:39 cloudera-manager-daemons-5.14.0-1.cm5140.p0.25.el7.x86_64.rpm
-rw-r--r-- 1 root root      8716 5月  15 10:39 cloudera-manager-server-5.14.0-1.cm5140.p0.25.el7.x86_64.rpm
-rw-r--r-- 1 root root     10612 5月  15 10:39 cloudera-manager-server-db-2-5.14.0-1.cm5140.p0.25.el7.x86_64.rpm
[root@hadoop001 cm-server-5.14.0]# yum localinstall *.rpm -y
[root@hadoop001 cm-server-5.14.0]# /usr/share/cmf/schema/scm_prepare_database.sh -h192.168.122.120 -P3306 --scm-host 192.168.122.120 --force mysql cm cdh *****
[root@hadoop001 cm-server-5.14.0]# service cloudera-scm-server start
Starting cloudera-scm-server (via systemctl):              [  OK  ]

 

四、hadoop001-006配置agent

#cloudera-manager-agent依赖于cloudera-manager-daemon
yum -y install cloudera-manager-agent-5.14.0-1.cm5140.p0.25.el7.x86_64.rpm cloudera-manager-daemons-5.14.0-1.cm5140.p0.25.el7.x86_64.rpm
sed -i 's/server_host=localhost/server_host=hadoop001/g' /etc/cloudera-scm-agent/config.ini

五、web安装 ip:7180

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值