操作系统:VMware RedHat 6.4 64bit
CUP:2 * 1
hadoop 2.5.1
java jdk 1.7.45
$groupadd -g 501 hadoop $useradd -m hadoop –g 501
A. $hostname 机器名称B. $vi /etc/hosts --ip 机器名称
C. $vi /etc/sysconfig/network --hostname=机器名称
D.$reboot --重启机器
$su - hadoop $ssh-keygen -t rsa -p '' $su - root $vi /etc/ssh/sshd_config #RSAAuthentication yes #PubkeyAuthentication yes #AuthorizedKeysFile .ssh/authorized_keys 修改为: RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys重启ssh服务
$service sshd restart测试ssh
$ssh localhost
下载:http://apache.org/dist/hadoop/core/hadoop-2.5.1/hadoop-2.5.1.tar.gz hadoop-2.5.1.tar.gz
解压:tar -zxvf hadoop-2.5.1.tar.gz
将编译好的native驱动(http://blog.csdn.net/rotkang/article/details/40391533)拷贝到hadoop-2.5.1/lib/下
权限:chown -R hadoop:hadoop hadoop-2.5.1
修改hadoop-env.sh、yarn-env.sh中重新指定JAVA_HOME变量
export JAVA_HOME=java path
$vi ~/hadoop-2.5.1/etc/hadoop/core-site.xml:
<configuration> <property> <name>fs.defaultFS</name> <value>hdfs://localhost:9000</value> </property> </configuration>$vi ~/hadoop-2.5.1/etc/hadoop/hdfs-site.xml:
<configuration> <property> <name>dfs.replication</name> <value>1</value> </property> </configuration>$vi ~/hadoop-2.5.1/etc/hadoop/mapred-site.xml:
<configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> </configuration>$vi ~/hadoop-2.5.1/etc/hadoop/yarn-site.xml:
<configuration> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> </configuration>
$start-dfs.sh
$start-yran.sh
或者
$start-all.sh
$stop-dfs.sh
$stop-yran.sh
或者
$stop-all.sh
测试一:$jps
测试二:http://ip:50070