Linux under the source installation JDK7

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.