1.安装配置步骤
# wget http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.rpm # rpm -ivh jdk-8u91-linux-x64.rpm # wget http://mirrors.hust.edu.cn/apache/hadoop/common/hadoop-2.6.4/hadoop-2.6.4.tar.gz # tar -zxvf hadoop-2.6.4.tar.gz # mv hadoop-2.6.4 /usr/local/hadoop # cd /usr/local/hadoop/ # vim etc/hadoop/hadoop-env.sh export JAVA_HOME=/usr/java/latest export HADOOP_PREFIX=/usr/local/hadoop # vim etc/hadoop/core-site.xml <configuration> <property> <name>fs.defaultFS</name> <value>hdfs://localhost:9000</value> </property> </configuration> # vim etc/hadoop/hdfs-site.xml <configuration> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>/hadoop/name/</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>/hadoop/data/</value> </property> </configuration> # bin/hdfs namenode -format # sbin/start-dfs.sh # bin/hdfs dfs -mkdir /eric # bin/hdfs dfs -ls / drwxr-xr-x - root supergroup 0 2016-07-05 20:37 /eric # bin/hadoop dfsadmin -report DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. Configured Capacity: 18788384768 (17.50 GB) Present Capacity: 14916325376 (13.89 GB) DFS Remaining: 14754893824 (13.74 GB) DFS Used: 161431552 (153.95 MB) DFS Used%: 1.08% Under replicated blocks: 0 Blocks with corrupt replicas: 0 Missing blocks: 0 ------------------------------------------------- Live datanodes (1): Name: 127.0.0.1:50010 (localhost.localdomain) Hostname: host101 Decommission Status : Normal Configured Capacity: 18788384768 (17.50 GB) DFS Used: 161431552 (153.95 MB) Non DFS Used: 3872059392 (3.61 GB) DFS Remaining: 14754893824 (13.74 GB) DFS Used%: 0.86% DFS Remaining%: 78.53% Configured Cache Capacity: 0 (0 B) Cache Used: 0 (0 B) Cache Remaining: 0 (0 B) Cache Used%: 100.00% Cache Remaining%: 0.00% Xceivers: 1 Last contact: Tue Jul 05 20:52:01 CST 2016 # bin/hdfs dfs -copyFromLocal /root/jdk-8u91-linux-x64.rpm /eric
2. 访问 http://192.168.1.101:50070/ 查看dfshealth
3. 参考学习
Hadoop 2.6.4单节点集群配置
http://hadoop.apache.org/docs/r2.6.4/hadoop-project-dist/hadoop-common/SingleCluster.html
Hadoop 1.0.4中文版文档
http://hadoop.apache.org/docs/r1.0.4/cn/
Hadoop的配置和使用
http://www.cnblogs.com/skyme/archive/2011/10/26/2223984.html
三台主机建立Hadoop小集群
http://developer.51cto.com/art/201205/337268.htm
hadoop学习笔记——环境搭建
http://www.cnblogs.com/huligong1234/p/3533382.html
用通俗易懂的话说下hadoop是什么,能做什么
http://blog.csdn.net/lifuxiangcaohui/article/details/23337905
Hadoop学习笔记之Hadoop基础
http://www.cnblogs.com/maybe2030/p/4593190.html
Hadoop参数:dfs.name.dir 与 dfs.data.dir
http://blog.sina.com.cn/s/blog_48a45b95010119cy.html