Linux installation JDK

Source: Internet
Author: User

1 Create a new two folder one to store the installation files, one to store the extracted files

Mkdir-p/export/software   // store installation files mkdir-p/export/servers     // store extracted files

2 Place the JDK files in the software folder on the server and extract them into the servers folder

Cd/export/software     //tar-zxvf jdk-8u141-linux-x64.tar.gz-c/export/servers/    //  Unzip

3 Uninstall the JDK that comes with your system

Rpm-qa | grep java      // search rpm-e--nodeps java-1.7.  0-openjdk-1.7. 0.131-2.6. 9.0. el6_8.x86_64   // uninstall rpm-e--nodeps tzdata-java-2016j-1  -e--nodeps java-1.6. 0-openjdk-1.6. 0.41-1.13. 13.1. el6_8.x86_64

4 editing the configuration file declaration environment variables

Vim/etc/profile       // Edit configuration file export JAVA_HOME=/EXPORT/SERVERS/JDK1.  8. 0_141     // end add export path= $PATH: $JAVA _home/bin

5 Recompile

Source/etc/profile      //  recompile java-version

Linux installation JDK

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.