192.168.23.234 server2
192.168.23.239 server3
http://mirrors.163.com/centos/6/isos/
关闭防火墙
service iptables stop
chkconfig iptables off
停闭selinux
vim /etc/sysconfig/selinux
SELINUX=disables
export JAVA_HOME=/usr/jdk1.8.0_25
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
BASE_HOME=/myhome/usr
JAVA_HOME=/usr/jdk1.8.0_25
CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar
PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export PATH
ssh-keygen -t rsa
cat id_rsa.pub>> authorized_keys
ssh [email protected] cat ~/.ssh/id_rsa.pub>> authorized_keys
ssh [email protected] cat ~/.ssh/id_rsa.pub>> authorized_keys
scp authorized_keys root@server2:~/.ssh/
scp authorized_keys root@server3:~/.ssh/
mkdir -p /myhome/usr#已安装的目录
mkdir -p /myhome/root
mkdir -p /myhome/tmp
mkdir -p /myhome/src
mkdir -p /myhome/logs
mkdir -p /myhome/dev
mkdir -p /myhome/bin
mkdir -p /myhome/usr/hadoop/yarn/local
mkdir -p /myhome/usr/hadoop/yarn/logs
mkdir -p /myhome/usr/hadoop/journal/zjenterprise
mkdir -p /myhome/usr/hadoop/hdfs/name
mkdir -p /myhome/usr/hadoop/hdfs/data
mkdir -p /myhome/usr/hadoop/tmp
mkdir -p /myhome/usr/hadoop/journal/
mkdir -p /myhome/usr/zookeeper/data/
touch /myhome/usr/zookeeper/data/myid
echo 1 > /myhome/usr/zookeeper/data/myid
core-site.xml
hdfs-site.xml
mapred-site.xml
yarn-site.xml
scp -r /myhome/usr/hadoop 192.168.23.234:/myhome/usr
scp -r /myhome/usr/hadoop 192.168.23.239:/myhome/usr
在Master服务器启动hadoop,从节点会自动启动,进入/home/hadoop/hadoop-2.7.0目录
(1)初始化,输入命令,bin/hdfs namenode -format
(2)全部启动sbin/start-all.sh,也可以分开sbin/start-dfs.sh、sbin/start-yarn.sh
(3)停止的话,输入命令,sbin/stop-all.sh
(4)输入命令,jps,可以看到相关信息