标签:
ssh免密码登陆配置
ssh localhost
ssh-keygen -t dsa -P ‘‘ -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
修改/etc/hosts文件(vi或gedit都可以,需要sudo)
添加YARN001这一行
解压jdk和Hadoop文件(目录为/home/llh/hadoop/)
添加可执行权限
tar -zxvf jdk-7u75-linux-i586.tar.gz
tar -zxvf hadoop-2.6.0.tar.gz
修改hadoop-env.sh
export JAVA_HOME=/home/llh/hadoop/jdk1.7.0_75/
修改mapred-site.xml
cp mapred-site.xml.template mapred-site.xml
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
修改core-site.xml
<property>
<name>fs.default.name</name>
<value>hdfs://YARN001:8020</value>
</property>
修改hdfs-site.xml
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>/home/llh/hadoop/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/home/llh/hadoop/dfs/data</value>
</property>
修改yarn-site.xml
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
格式化hdfs
bin/hadoop namenode -format
启动hdfs
sbin/hadoop-daemon.sh start namenode
sbin/hadoop-daemon.sh start datanode
web界面 http://yarn001:50070
hdfs上传文件
bin/hadoop fs -mkdir /home/llh
bin/hadoop fs -put README.txt /home/llh
启动yarn
sbin/start-yarn.sh
web界面:http://yarn001:8088
标签:
原文地址:http://www.cnblogs.com/iceland/p/4286967.html