Installation Instructions
Installation environment: Red Hat Enterprise Linux7.1
Installation method: Source Installation
Software: jdk-7u80-linux-x64.gz
Installation
#首先查看系统原有JDK信息rpm-qa | grep java# Delete the original OPENJDK installation, use our own JDK, reduce the problem error rate (do not check dependencies, delete rpm package directly) Rpm-qa|grep Java|xargs rpm-e--nodeps
#上传安装文件到/usr/local/
#进入安装目录cd/usr/local/#删除原安装 (if previously installed) RM-RF jdk7# decompression tar-zxv-f jdk-7u80-linux-x64.gz# Modify installation directory MV jdk1.7.0_80 jdk7# verify installation/usr /local/jdk7/bin/java-version
#------------------The following is the configuration environment variable--------------
#追加到环境变量cat >>/etc/profile<<eofexport Java_home=/usr/local/jdk7export jre_home=/usr/local/jdk7/ Jreexport classpath=.:\ $JAVA _home/lib/dt.jar:\ $JAVA _home/lib/tools.jar:\ $JRE _home/libexport path=\ $JAVA _home/bin:\ $JRE _home/bin:\$ patheof# Immediate effect Source/etc/profile
#验证java-version
#如果出现下面的信息说明安装配置成功
[Email protected] ~]# java-version
Java Version "1.7.0_80"
Java (TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot (TM) 64-bit Server VM (build 24.80-b11, Mixed mode)
Linux under the source installation JDK7