标签:eps path linux dep root file x64 jar lin
查看原装jdk
[root@slave1 java]# rpm -qa | grep jdk
java-1.7.0-openjdk-headless-1.7.0.91-2.6.2.3.el7.x86_64
java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64
java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64
java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64
卸载原装jdk
[root@master java]# rpm -e --nodeps java-1.7.0-openjdk-headless-1.7.0.91-2.6.2.3.el7.x86_64
[root@master java]# rpm -e --nodeps java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64
[root@master java]# rpm -e --nodeps java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64
[root@master java]# rpm -e --nodeps java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64
在usr文件夹下创建java文件夹
cd /usr/java
导入jdk,解压
tar -zxvf jdk-8u131-linux-x64.tar.gz
转移
mv jdk1.8.0_131/ jdk
安装jdk和Hadoop,配置环境变量:vi /etc/profile
JAVA_HOME=/usr/java/jdk
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
让修改生效:
source /etc/profile
标签:eps path linux dep root file x64 jar lin
原文地址:http://www.cnblogs.com/java-spring/p/7791734.html