删除自带openJDK
rpm -qa | grep java
rpm -e --nodeps java-1.6.0-openjdk-1.6.0.0-1.50.1.11.5.el6_3.x86_64rpm -e --nodeps java-1.7.0-openjdk-1.7.0.9-2.3.4.1.el6_3.x86_64
rpm -e --nodeps tzdata-java-2012j-1.el6.noarch
mkdir /opt/modules
mkdir /opt/tools
mkdir /opt/software
解压源码包,输入命令:tar -zxvf jdk-7u7-linux-i586.tar.gz
mv jdk1.7.0_79 /opt/modules/jdk1.7
vim /etc/profile
##JAVA
export JAVA_HOME=/opt/modules/jdk1.7
export PATH=$PATH:$JAVA_HOME/bin
source /etc/profile
设置主机名
/etc/hosts 格式 ip aaa.bbb.ccc aaa
192.168.192.129 hadoop-master.dragon.org hadoop-master
永久生效
vi /etc/sysconfig/network
HOSTNAME=hadoop-master
临时生效
hostname hadoop-master