天天看點

CDH 叢集修改IP

遷移伺服器修改CDH叢集 ip

1. 關閉 CDH 及 Cloudera Management Service

CDH 叢集修改IP

2. 停止CDH叢集及 CM 服務

# 主節點
systemctl stop cloudera-scm-server
systemctl stop cloudera-scm-agent

# 從節點
systemctl stop cloudera-scm-agent           

3. 修改中繼資料

select host_id, name, ip_address from scm.`HOSTS`;           

CDH 叢集修改IP

use scm;
update HOSTS set ip_address = '192.168.100.45' where name='cdh-master';
update HOSTS set ip_address = '192.168.100.46' where name='cdh-slave01';
update HOSTS set ip_address = '192.168.100.47' where name='cdh-slave02';           

4. 修改節點 ip

vim /etc/sysconfig/network-scripts/ifcfg-enp5s0           

CDH 叢集修改IP

5. 修改映射

vim /etc/hosts           

CDH 叢集修改IP

6. 修改 ntp

vim /etc/ntp.conf

# 主節點
# 修改允許同步的區域網路段
restrict 192.168.100.0 mask 255.255.255.0 nomodify notrap

# 從節點
# 修改同步的主機ip
server 192.168.100.45
restrict 192.168.100.45 nomodify notrap noquery           

CDH 叢集修改IP

7. 修改各 agent 配置檔案server主機

vim /etc/cloudera-scm-agent/config.ini

# Hostname of the CM server.
server_host=cdh-master           

CDH 叢集修改IP

8. 重動 CM

systemctl restart cloudera-scm-agent
systemctl restart cloudera-scm-server           

9. 重新開機 CDH 及 Cloudera Management Service