0.停止cdh相关服务

  1. # 主节点停止server
  2. /etc/rc.d/init.d/cloudera-scm-server stop
  3. # 每台节点上停止动agent
  4. /etc/rc.d/init.d/cloudera-scm-agent stop

1.登录元数据库(这里以mysql为列),修改ip_address 为你新的ip地址。

  1. mysql -uroot -p
  2. mysql>use scm;
  3. mysql> select host_id, host_identifier, name, ip_address from HOSTS;
  4. +---------+--------------------------------------+---------+----------------+
  5. | host_id | host_identifier | name | ip_address |
  6. +---------+--------------------------------------+---------+----------------+
  7. | 1 | 618a1057-7d31-4918-97b3-d071e66f8450 | slave02 | 192.168.132.96 |
  8. | 2 | eb168501-fbb0-4414-999b-c040db3ecba3 | slave01 | 192.168.132.95 |
  9. | 3 | 9ce2e4e6-18e7-4ecc-a4d1-1aba60bc4d46 | master | 192.168.132.94 |
  10. +---------+--------------------------------------+---------+----------------+
  11. 3 rows in set (0.00 sec)

2.修改所有节点的/etc/hosts ,修改ip为你新的ip地址。

  1. vi /etc/hosts
  2. 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
  3. ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
  4. 192.168.132.94 master
  5. 192.168.132.95 slave01
  6. 192.168.132.96 slave02

3 修改所有节点 /etc/cloudera-scm-agent/config.ini 的 server_host为cm server的ip

  1. vi /etc/cloudera-scm-agent/config.ini
  2. # Hostname of the CM server.
  3. server_host=192.168.132.94

4.修改 CM server的节点的元数据库配置信息,修改com.cloudera.cmf.db.host =元数据库新的ip

  1. vi /etc/cloudera-scm-server/db.properties
  2. # Auto-generated by scm_prepare_database.sh on Thu Dec 31 18:05:43 CST 2020
  3. #
  4. # For information describing how to configure the Cloudera Manager Server
  5. # to connect to databases, see the "Cloudera Manager Installation Guide."
  6. #
  7. com.cloudera.cmf.db.type=mysql
  8. com.cloudera.cmf.db.host=192.168.132.94
  9. com.cloudera.cmf.db.name=scm
  10. com.cloudera.cmf.db.user=cdh
  11. com.cloudera.cmf.db.setupType=EXTERNAL
  12. com.cloudera.cmf.db.password=asd000000
  13. ~
  1. 启动cdh相关服务 ```shell

    主节点启动server

    /etc/rc.d/init.d/cloudera-scm-server start

每台节点上启动agent

/etc/rc.d/init.d/cloudera-scm-agent start ```