Execute these commands on the NameNode host machine:
su $HDFS_USER /usr/lib/hadoop/bin/hadoop namenode -format /usr/lib/hadoop/sbin/hadoop-daemon.sh --config $HADOOP_CONF_DIR start namenode
Execute these commands on the SecondaryNameNode:
su $HDFS_USER /usr/lib/hadoop/sbin/hadoop-daemon.sh --config $HADOOP_CONF_DIR start secondarynamenode
Execute these commands on all DataNodes:
su $HDFS_USER /usr/lib/hadoop/sbin/hadoop-daemon.sh --config $HADOOP_CONF_DIR start datanode
where:
$HDFS_USER
is the user owning the HDFS services. For example,hdfs
.$HADOOP_CONF_DIR
is the directory for storing the Hadoop configuration files. For example,/etc/hadoop/conf
.