Advertisement

Thursday, February 22, 2018

Hadoop V1 Install - Hadoop Software Setup and Evironment Configuration

This is continuation from last blog of Hadoop V1 Pre-req

Step 1
[As root -  Namenode - Send Hadoop Binaries]
# for i in $(cat hosts) ; do echo "scp hadoop-1.2.1.tar.gz ${i}:/tmp &" >> /tmp/sendhdpv1.bash ; done
bash /tmp/sendhdpv1.bash


Step 2
[As root - Extract Hadoop]
#for i in $(cat hosts) ;do ssh ${i} tar -xzf /tmp/hadoop-1.2.1.tar.gz -C /usr/local; done

Step 3 

[As root - Setup sudoers configuration]
#for i in $(cat hosts) ; do ssh ${i}  echo '"hduser        ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers'; done
Step 4
[As root - Create Conf Directory]
#for i in $(cat hosts) ;do ssh ${i} mkdir /etc/hadoop; done



Step 5 - All Other Configurations
[As root - Move the conf directory]
# for i in $(cat hosts) ;do ssh ${i} mv /usr/local/hadoop-1.2.1/conf /etc/hadoop/conf; done

[As root - Give Permissions]
# for i in $(cat hosts) ;do ssh ${i} chmod -R 755 /etc/hadoop ; done;


# for i in $(cat /tmp/hosts) ; do ssh ${i} 'hostname; jps | mkdir -p /opt/HDPV1/logs ; echo' ;  done;
# for i in $(cat /tmp/hosts) ; do ssh ${i} 'hostname; jps | chmod 777  /opt/HDPV1/logs; echo' ;  done;

# for i in $(cat /tmp/hosts) ; do ssh ${i} 'hostname; jps | mkdir -p /opt/HDPV1/pids ; echo' ;  done;
# for i in $(cat /tmp/hosts) ; do ssh ${i} 'hostname; jps | chmod 777  /opt/HDPV1/pids; echo' ;  done;


[As root - Create Soft Link to Hadoop]
# for i in $(cat hosts) ;do ssh ${i} ln -s /usr/local/hadoop-1.2.1 /usr/local/hadoop  ; done


[As root - Create Soft Link]
# for i in $(cat hosts) ;do ssh ${i} ln -s /etc/hadoop/conf /usr/local/hadoop-1.2.1/conf ; done


[As hduser and mapred - Set Environment Variables [Change hduser to mapred]]

# for i in $(cat hosts) ; do ssh ${i} echo 'export HADOOP_PREFIX=/usr/local/hadoop >> /home/hduser/.bashrc' ; done
#for i in $(cat hosts) ; do ssh ${i} echo 'export JAVA_HOME=/usr/java/latest >> /home/hduser/.bashrc' ; done

#for i in $(cat hosts) ; do ssh ${i} echo 'export LOG=/opt/HDPV1/logs >> /home/hduser/.bashrc' ; done

#for i in $(cat hosts) ; do ssh ${i} echo 'export CONF=/etc/hadoop/conf >> /home/hduser/.bashrc' ; done


#for i in $(cat hosts) ; do ssh ${i} echo 'PATH=\$JAVA_HOME/bin:\$HADOOP_PREFIX/bin:\$HADOOP_PREFIX/sbin:\$PATH >> /home/hduser/.bashrc' ; done
#for i in $(cat hosts) ; do ssh ${i} echo 'export PATH >> /home/hduser/.bashrc' ; done


 

No comments:
Write comments