##/bin/bash
if [ $UID -ne 0 ];then
echo "must be root"
exit
fi
mkdir -p /opt/modules
chown -R kurds:kurds /opt/*
chown -R kurds:kurds /opt/*
chmod u+x /opt/*
echo 'export JAVA_HOME=/opt/modules/jdk1.7.0_79' >> /etc/profile
echo 'export PATH=$PATH:$JAVA_HOME/bin' >> /etc/profile
echo "127.0.0.1 localhost localhost4 localhost4.localdomain4" > /etc/hosts
echo "192.168.171.243 hadoop-sernor1" >> /etc/hosts
echo "192.168.171.244 hadoop-sernor2" >> /etc/hosts
source /etc/profile
reboot