Hadoop2.7.4安装之后./sbin/start-dfs.sh报错:
Incorrect configuration: namenode address dfs.namenode.servicerpc-address or dfs.namenode.rpc-address is not configured.
Starting namenodes on []
Error: Cannot find configuration directory: /usr/local/hadoop/conf
Error: Cannot find configuration directory: /usr/local/hadoop/conf
Starting secondary namenodes [0.0.0.0]
Error: Cannot find configuration directory: /usr/local/hadoop/conf
原因是Hadoop之前的版本hadoop-env.sh, hdfs-site.xml, core-site.xml, mapred-site.xml这些配置文件都是在/usr/local/hadoop/conf
较新的版本在/usr/local/hadoop/etc/hadoop
需要设置环境变量export HADOOP_CONF_DIR = $HADOOP_HOME/etc/hadoop
输入echo $HADOOP_CONF_DIR验证配置的位置