6.namenode格式化 首先切换用户到hadoop用户,然后我们跳转到/opt/software/hadoop.... 即hadoop的文件目录下了,输入指令bin/hdfs namenode -format,此事如果报错为(WARN net.DNS: Unable to determine local hostname -falling back to "localhost"java.net.UnknownHostException: ruozehadoop001.localdomain: ruozehadoop001.localdomain: unknown error ),我们需要进入文件/etc/sysconfig/network中,vi编辑它,变成如图: