1.conf/core-site.xml:
2.conf/hadoop-env.sh:
export JAVA_HOME=/home/hadoop/jdk1.x.x_xx
3. conf/hdfs-site.xml:
4.conf/mapred-site.xml:
5. conf/masters:
master
6.conf/secondarynamenode(此为新建的文件)
node1
7. conf/slaves:
node2
node3
node4
8.bin/start-dfs.sh:
"$bin"/hadoop-daemon.sh --config $HADOOP_CONF_DIR start namenode $nameStartOpt
"$bin"/hadoop-daemons.sh --config $HADOOP_CONF_DIR start datanode $dataStartOpt
"$bin"/hadoop-daemons.sh --config $HADOOP_CONF_DIR --hosts secondarynamenode start secondarynamenode
9.bin/stop-dfs.sh:
"$bin"/hadoop-daemon.sh --config $HADOOP_CONF_DIR stop namenode $nameStartOpt
"$bin"/hadoop-daemons.sh --config $HADOOP_CONF_DIR stop datanode $dataStartOpt
"$bin"/hadoop-daemons.sh --config $HADOOP_CONF_DIR --hosts secondarynamenode stop secondarynamenode