标签:
1. 下载源码:
wget http://archive.apache.org/dist/hadoop/core/hadoop-1.0.4/hadoop-1.0.4.tar.gz
2. 免登陆ssh配置:
ssh-keygen -t dsa -P ‘‘ -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
3. 安装软件
sudo yum install ssh
sudo yum install rsync
4. 解压缩
tar zxvf hadoop-1.0.4.tar.gz
5. 配置core-site.xml
<configuration>?
<property>?
<name>fs.default.name</name>?
<value>hdfs:// localhost:9000</value>?
</property>?
</conf iguration>
6. 配置hdfs-site.xml
<configuration>?
<property>?
<name>dfs.replication</name>?
<value>1</value>?
</property>?
<property>
<name>dfs.name.dir</name>?
<value>/home/nuoline/hdfs-filesystem/name</value>?
</property>?
<property>?
<name>dfs.data.dir</name>?
<value>/home/nuoline/hdfs-filesystem/data</value>?
</property>
?</conf iguration>
7. 配置mapred-site.xml
<configuration>?
<property>?
<name>mapred.job.tracker</name>?
<value>localhost:9001</value>?
</property>
?</configuration>
8. 配置hadoop-env.sh
export JAVA_HOME=/usr/local/jdk
9. 进入bin目录,操作:
hadoop namenode -format // 格式化Hadoop分布式文件系统
start-all.sh // 启动Hadoop
stop-all.sh // 关闭Hadoop
hadoop
标签:
原文地址:http://www.cnblogs.com/keethebest/p/5328567.html