./hadoop-daemon.sh start namenode
./hadoop-daemon.sh start datanode
./hadoop-daemon.sh start secondarynamenode
# resourcemanager nodemanager
./yarn-daemon.sh start resourcemanager
./yarn-daemon.sh start nodemanager
# datanode
./start-dfs.sh
./stop-dfs.sh
# nodemanager
./start-yarn.sh
./start-all.sh
# 显示hdfs根下的文件
hadoop fs -ls hdfs://os-1:9000/
hadoop fs -ls / #简写
# 讲本地文件拷贝到hdfs上面
hadoop fs -copyFromLocal anaconda-ks.cfg /
# 指定客户端使用的用户
-DHADOOP_USER_NAME=root
09-28