以后慢慢完善这些吧。每次敲 都放到虚拟机里面,虚拟机删除掉,脚本都没了。所以把这些东西写到博客里。
sed -i "s#SELINUX=enforcing#SELINUX=disabled#g" /etc/sysconfig/selinux
systemctl disable firewalld.service
echo "hadoop-`ip a | awk -F "[ /]+" ‘{if (NR==9) print $3}‘ | cut -c 13-15`" >/etc/hostname
hostname hadoop-`ip a | awk -F "[ /]+" ‘{if (NR==9) print $3}‘ | cut -c 13-15`
setenforce 0
reboot
cat >> /etc/hosts <<EOF
192.168.200.64 hadoop-64
192.168.200.61 hadoop-61
192.168.200.63 hadoop-63
192.168.200.89 hadoop-89
EOF
时间: 2024-10-30 09:41:40