Hadoop 开发环境(CentOS6.4)
configure ssh
1.add a dedicated hadoop system user
sudo groupadd hadoop
sudo useradd -G hadoop hduser
sudo passwd hduser
2.generate ssh private key
ssh-keygen -t rsa
cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
ssh localhost
3.exchange ssh public key
ssh-copy-id -i $HOME/.ssh/id_rsa.pub hduser@slave
install hadoop
1.tar zxvf ~/Downloads/hadoop-1.2.1.tar.gz .
mv hadoop-1.2.1 / hadoop
chown -R hduser:hadoop hadoop
vi .bashrc
export HADOOP_HOME=/home/hduser/hadoop
2.conf hadoop-env.sh
vi $HADOOP_HOME/conf/hadoop-env.sh
export JAVA_HOME=..
3.make dir
sudo mkdir -p app/hadoop/tmp
sudo chown hduser:hadoop app/hadoop/tmp
sudo chmod 750 app/hadoop/tmp
4.conf core-site.sh
5.conf hdfs-site.sh
6.conf mapred-site.sh
7. conf host
192.168.3.151 master
192.168.3.188 slave1
192.168.3.189 slave2
8. conf master
9. conf slave
10.start and check status
要保证iptables,selinux关闭