- 设置静态IP
- 添加hosts文件
- 配置免密并拷贝hosts文件
- 关闭防火墙
- 关闭selinux
- 同步配置文件
- 网络增强配置
- 总结
软件版本
- ambari 2.7.5
- HDP 3.1.5
- centos7.9
静态IP设置很简单,修改网络配置文件
vim /etc/sysconfig/network-scripts/ifcfg-ens33
配置如下
BOOTPROTO="static" ONBOOT="yes" IPADDR=192.168.1.21 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=192.168.1.1
每台机器均修改为静态IP
添加hosts文件vim /etc/host
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.21 hadoop1 192.168.1.22 hadoop2 192.168.1.23 hadoop3配置免密并拷贝hosts文件
主节点访问子节点需要免密,使用命令生成密钥,并拷贝到子节点,主节点为hadoop1
ssh-keygen ssh-copy-id关闭防火墙
systemctl stop firewalld systemctl disable firewalld or service firewalld stop chkconfig firewalld off关闭selinux
vim /etc/selinux/config SELINUX=disabled同步配置文件
scp /etc/hosts hadoop2:/etc/hosts scp /etc/selinux/config hadoop2:/etc/selinux/config scp /etc/hosts hadoop3:/etc/hosts scp /etc/selinux/config hadoop3:/etc/selinux/config网络增强配置
如果是物理机,交换机插槽较多,可以配置bond6使用双网口进行访问,加快网络的吞吐。bond6配置后续有空会展开来描述。
总结操作系统初始配置到此结束,后续进行安装前的yum配置。



