1)、卸載原有jdkhtml
java -versionjava
顯示node
java version "1.6.0_24"linux
OpenJDK Runtime Environment (IcedTea6 1.11.1) (rhel-1.45.1.11.1.el6-i386)vim
OpenJDK Client VM (build 20.0-b12, mixed mode)eclipse
rpm -qa | grep javaui
顯示lua
libvirt-java-0.4.7-1.el6.noarchspa
tzdata-java-2012c-1.el6.noarchhtm
subversion-javahl-1.6.11-7.el6.i686
libvirt-java-devel-0.4.7-1.el6.noarch
java_cup-0.10k-5.el6.i686
ant-javamail-1.7.1-13.el6.i686
lpg-java-compat-1.1.0-4.1.el6.noarch
eclipse-mylyn-java-3.4.2-9.el6.i686
# rpm -e --nodeps libvirt-java-0.4.7-1.el6.noarch
# rpm -e --nodeps
rpm: no packages given for erase
# rpm -e --nodeps tzdata-java-2012c-1.el6.noarch
# rpm -e --nodeps subversion-javahl-1.6.11-7.el6.i686
# rpm -e --nodeps libvirt-java-devel-0.4.7-1.el6.noarch
# rpm -e --nodeps java_cup-0.10k-5.el6.i686
# rpm -e --nodeps ant-javamail-1.7.1-13.el6.i686
# rpm -e --nodeps lpg-java-compat-1.1.0-4.1.el6.noarch
# rpm -e --nodeps eclipse-mylyn-java-3.4.2-9.el6.i686
2)、安裝1.8JDK
a) 百度雲連接連接:https://pan.baidu.com/s/1IWfBIpr3KGaoXXGCsGyUEQ
b) 提取碼:mgwc
a) Samba安裝參考:http://www.javashuo.com/article/p-nsngpetn-bs.html
a) 建立Java家目錄
mkdir /usr/java
加壓jdk到Java家目錄
tar -xzvf jdk-8u11-linux-i586.tar.gz -C /usr/java/
修改配置文件,文件結尾添加文本
vim /etc/profile
export JAVA_HOME=/usr/java/jdk1.8.0_11
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
a)
source /etc/profile