华为云服务器centos7.2下hadoop配置的小脚本

getId_rsa.pub.sh

#!/bin/bash
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
for i in $( seq 2 5 )
do
   scp root@ecs-node-000${i}:~/.ssh/id_rsa.pub  ~/.ssh/p${i} 
   cat ~/.ssh/p${i} >> ~/.ssh/authorized_keys
done
sendAuthorized_keys.sh 

#!/bin/bash
for i in $( seq 2 5 )
do
   scp ~/.ssh/authorized_keys  root@ecs-node-000${i}:~/.ssh
done

sendHadoopEtc.sh

#!/bin/bash
for i in $( seq 2 5 )
do
   scp -r /usr/local/src/hadoop/hadoop/etc/hadoop  root@ecs-node-000${i}:/usr/local/src/hadoop/hadoop/etc
done

goToHadoopRootDir.sh

cd /usr/local/src/hadoop/hadoop

你可能感兴趣的:(华为云服务器centos7.2下hadoop配置的小脚本)