日期:2014-05-16  浏览次数:20681 次

hadoop2.3.0单点伪分布与多点分布的配置
机器mac book,virtualbox4.3.6,virtualbox安装ubunt13.10,在多点分布环境中,配置好一个机器后,clone出另外2个,一共三台机器。

1. Configure the Environment
Bash语言
sudo apt-get install -y openjdk-7-jdk openssh-server
sudo addgroup hadoop
sudo adduser —ingroup hadoop hadoop # create password
sudo visudo
hadoop  ALL=(ALL) ALL # hadoop user can use sudo
su - hadoop # need password
ssh-keygen -t rsa -P "" # Enter file (/home/hadoop/.ssh/id_rsa)

cat /home/hadoop/.ssh/id_rsa.pub >> /home/hadoop/.ssh/authorized_keys
wget http://apache.fayea.com/apache-mirror/hadoop/common/hadoop-2.3.0/hadoop-2.3.0.tar.gz
tar zxvf hadoop-2.3.0.tar.gz
sudo cp -r hadoop-2.3.0/ /opt
cd /opt
sudo ln -s hadoop-2.3.0 hadoop
sudo chown -R hadoop:hadoop hadoop-2.3.0
sed -i '$a \\nexport JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64' hadoop/etc/hadoop/hadoop-env.sh




2. Configure hadoop single Node environment
cp mapred-site.xml.template mapred-site.xml
vi mapred-site.xml