hadoop-03-安装java
1,su root
2, rpm -qa|grep jdk #查看已经安装的jdk
3,rpm -e --nodeps `rpm -qa|grep jdk ` #删除已经安装的jdk
4, rpm -ihv /software/jdk-8u121-linux-x64.rpm
5, vi /etc/profile #修改全部用户的配置
export JAVA_HOME=/usr/java/latest
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
6, 配置立即生效
. /etc/profile #配置立即生效
source /etc/profile #配置立即生效