其他分享
首页 > 其他分享> > CDH6.2.3添加节点

CDH6.2.3添加节点

作者:互联网

CDH6.2.3添加节点

一、环境准备

1、设置添加节点的ip

echo "192.168.17.131 cdh05" >> /etc/hosts
or
hostnamectl set-hostname cdh05

2、添加其他节点IP和域名映射(每个节点)

vim /etc/hosts

 3、关闭防火墙

# 执行关闭命令
systemctl stop firewalld.service 
# 执行开机禁用防火墙自启命令
systemctl disable firewalld.service

4、关闭selinux

vim /etc/selinux/config
# 修改为,需要重启后才能生效
SELINUX=disabled

5、时钟同步

# 安装ntp
yum -y install ntp
# 启动ntp服务
systemctl start ntpd
# 查看是否启动
ps -ef | grep ntpd
# 开机启动
systemctl enable ntpd.service
# 查看当前时间
date
vim /etc/ntp.conf
# 注释掉原来的ntp配置
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
#### 增加下面的配置
server cdh01 iburst
# 最后都重启ntpd服务
systemctl restart ntpd
# 检测时间同步情况
ntpq -p

6、配置免密登录

# 生成密钥
ssh-keygen -t rsa
# ssh-copy-id 到每个节点

7、设置交换内存

sysctl vm.swappiness=10
echo 'vm.swappiness=10'>> /etc/sysctl.conf

8、关闭透明大页

## 临时关闭
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled

## 永久关闭
echo ' ' >> /etc/rc.local
echo '# 关闭大透明页面' >> /etc/rc.local
echo 'echo never > /sys/kernel/mm/transparent_hugepage/defrag' >> /etc/rc.local
echo 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' >> /etc/rc.local

## 查看是否关闭
cat /sys/kernel/mm/transparent_hugepage/defrag
cat /sys/kernel/mm/transparent_hugepage/enabled

二、安装agent

1、安装jdk

mkdir -p /usr/java/
tar -zxvf jdk-8u211-linux-x64.tar.gz -C /usr/java/
#切记必须修正所属用户及用户组
chown -R root:root /usr/java/jdk1.8.0_211

vim/etc/profile
#JAVA_HOME
export JAVA_HOME=/usr/java/jdk1.8.0_211
export PATH=$PATH:$JAVA_HOME/bin

2、上传mysql jdbc jar

[root@cdh002 mysql]# mkdir -p /usr/share/java/
重命名不能带版本号
cp mysql-connector-java-5.1.47.jar /usr/share/java/mysql-connector-java.jar

3、部署agent

# 创建⽬录及解压
mkdir /opt/cloudera-manager
tar -xzvf cm6.3.1-redhat7.tar.gz -C /opt/cloudera-manager/
tar -zxvf cm6.3.1-redhat7.tar.gz -C /opt/cloudera-manager/

cd /opt/cloudera-manager/cm6.3.1/RPMS/x86_64/
rpm -ivh cloudera-manager-daemons-6.3.1-1466458.el7.x86_64.rpm --nodeps --force
rpm -ivh cloudera-manager-agent-6.3.1-1466458.el7.x86_64.rpm --nodeps --force

# 修改agent的配置,指向server的节点cdh01
sed -i "s/server_host=localhost/server_host=cdh001/g" /etc/cloudera-scm-agent/config.ini

4、开始添加节点

标签:cloudera,java,CDH6.2,echo,etc,添加,ntp,server,节点
来源: https://blog.csdn.net/qq_41834550/article/details/115373548