[정수리] CentOS 7.2 시스템 Hadoop 클러스터 배포

1947 단어
1.    :
    :
[root@hadoop-master ~]# cat /etc/redhat-release 
CentOS Linux release 7.2.1511 (Core) 

     :
10.0.8.10     
echo "Hadoop-master" > /etc/hostname

10.0.8.11     
echo "Hadoop-node1" > /etc/hostname

10.0.8.12     
echo "Hadoop-node2" > /etc/hostname

        
cat >>/etc/hosts<< EOF
10.0.8.10         Hadoop-master
10.0.8.11         Hadoop-node1
10.0.8.12         Hadoop-node2
EOF

ping  Hadoop-master
ping  Hadoop-node1
ping  Hadoop-node2

     
systemctl stop firewalld.service
systemctl disable firewalld.service
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
grep SELINUX=disabled /etc/selinux/config
setenforce 0

   
hadoop-2.7.3.tar.gz
jdk-8u101-linux-x64.tar.gz

  JDK
yum install glibc.i686 -y
tar -xvf jdk-8u101-linux-x64.tar.gz -C /usr/local/src/
cat >>/etc/profile<< EOF
export JAVA_HOME=/usr/local/src/jdk1.8.0_101
export JRE_HOME=/usr/local/src/jdk1.8.0_101/jre
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
EOF
source /etc/profile
java -version
    
useradd hadoop
echo hadoop |passwd --stdin hadoop
echo hadoop  "ALL=(ALL)       NOPASSWD: ALL" >>/etc/sudoers
grep -w hadoop  /etc/sudoers

  key     

ssh-keygen -t rsa 
cd /home/hadoop/.ssh/ 
cp id_rsa.pub  authorized_keys 
chmod go-wx  authorized_keys

scp ~/.ssh/authorized_keys hadoop-node1:/home/hadoop/.ssh/
scp ~/.ssh/authorized_keys hadoop-node2:/home/hadoop/.ssh/

    :
[root@hadoop-master ~]# ssh hadoop-node1
[root@hadoop-master ~]# ssh hadoop-node2

   node1,node2 hadoop        master,                  
scp ~/.ssh/id_rsa hadoop-node1:/home/hadoop/.ssh/
scp ~/.ssh/id_rsa hadoop-node2:/home/hadoop/.ssh/





좋은 웹페이지 즐겨찾기