CDH6.3修改主機IP

修改ip

開始是在公司使用橋接模式,回到家使用無線網段變了,遂改掉IP,CDH中還是配置的原來的IP,需要改掉

停服務

[root@node01 ~]# service cloudera-scm-agent stop
[root@node01 ~]# service cloudera-scm-server stop

進入mysql修改元數據ip

mysql -u root -p123
MariaDB [cm]> select host_id, host_identifier, name, ip_address from HOSTS;
+---------+--------------------------------------+--------+--------------+
| host_id | host_identifier                      | name   | ip_address   |
+---------+--------------------------------------+--------+--------------+
|       1 | 912f0256-f551-4b04-b314-0f7506c8ece7 | node01 | 192.168.1.81 |
|       2 | aafbe8a2-44a5-43b0-8b8b-b789cfed2f56 | node02 | 192.168.1.82 |
|       3 | 187eb2a6-1c71-4614-82f3-21ca82105e07 | node03 | 192.168.1.83 |
+---------+--------------------------------------+--------+--------------+

修改各主機的ip(分別修改各主機的ip)

MariaDB [cm]> update HOSTS set ip_address='192.168.206.81' where host_id='1'
    -> ;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [cm]> update HOSTS set ip_address='192.168.206.82' where host_id='2'
    -> ;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [cm]> update HOSTS set ip_address='192.168.206.83' where host_id='3';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

#修改完成後退出數據庫
#輸入命令 :\q 即可

修改所有hadoop集羣機器中的cloudera-scm-agent的配置文件

所有機器修改

vi /etc/cloudera-scm-agent/config.ini
[General]
# Hostname of the CM server.
server_host=node01

# Port that the CM server is listening on.
server_port=7182

重啓服務

[root@node01 ~]# systemctl start cloudera-scm-agent.service
[root@node01 ~]# systemctl restart cloudera-scm-server

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章