JDK installation method on Linux platform

Source: Internet
Author: User
Tags inotify

JDK Installation Documentation


1) Create a directory of fixed storage software


[Email protected] tools]# pwd

/home/oldboy/tools



02) Upload the installation file

Rz-y

3) View Results

[email protected] tools]# LL

Total dosage 83776

DRWXRWXRWX 6 1000 1000 4096 August 07:37 inotify-tools-3.14

-rw-r--r--1 root root 358772 August 19:34 inotify-tools-3.14.tar.gz

-rw-r--r--1 root root 85418489 January 1 jdk-6u27-linux-x64.bin

4) Modify Permissions

[Email protected] tools]# chmod +x jdk-6u27-linux-x64.bin

[Email protected] tools]#/jdk-6u27-linux-x64.bin #解压过程

#出现这个表示正常解压

Press Enter to continue .....


Done.


5) Installing the JDK

[Email protected] tools]# mkdir-p/application/

[Email protected] tools]# MV jdk1.6.0_27//application/

[email protected] application]# LL

Total dosage 16

lrwxrwxrwx 1 root root 25 June 04:46 Apache--/application/apache2.2.17

Drwxr-xr-x 2 root root 4096 June 04:41 apache2.2.17

Drwxr-xr-x root root 4096 September 3 20:47 jdk1.6.0_27

Drwxr-xr-x 4 root root 4096 September 3 20:24 svndata

Drwxr-xr-x 2 root root 4096 August 06:59 svnpasswd

[Email protected] application]# ln-s JDK1.6.0_27/JDK


[email protected] application]# LL

Total dosage 16

lrwxrwxrwx 1 root root 25 June 04:46 Apache--/application/apache2.2.17

Drwxr-xr-x 2 root root 4096 June 04:41 apache2.2.17

lrwxrwxrwx 1 root root 12 September 3 20:56 jdk--jdk1.6.0_27/

Drwxr-xr-x root root 4096 September 3 20:47 jdk1.6.0_27

Drwxr-xr-x 4 root root 4096 September 3 20:24 svndata

Drwxr-xr-x 2 root root 4096 August 06:59 svnpasswd


[Email protected] application]# ls-l/application/|grep JDK

lrwxrwxrwx 1 root root 12 September 3 20:56 jdk--jdk1.6.0_27/

Drwxr-xr-x root root 4096 September 3 20:47 jdk1.6.0_27

6) Check that the JDK is installed correctly

[Email protected] application]# java-version

-bash:java:command not found

[Email protected] application]#/application/jdk/bin/java-version

Java Version "1.6.0_27"

Java (TM) SE Runtime Environment (build 1.6.0_27-b07)

Java HotSpot (TM) 64-bit Server VM (build 20.2-b06, Mixed mode)

7) Setting Environment variables


Echo ' #java env begin ' >>/etc/profile

echo ' Export java_home=/application/jdk ' >>/etc/profile

Echo ' Export classpath= $CLASSPATH: $JAVA _home/lib: $JAVA _home/jre/lib ' >>/etc/profile

Echo ' Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH: $HOME/bin ' >>/etc/profile

Echo ' #java env end ' >>/etc/profile



[Email protected] application]# tail-6/etc/profile

Alias Vi= ' Vim '

#java ENV begin

Export JAVA_HOME=/APPLICATION/JDK

Export classpath= $CLASSPATH: $JAVA _home/lib: $JAVA _home/jre/lib

Export path= $JAVA _home/bin: $JAVA _home/jre/bin: $PATH: $HOME/bin

#java Env End


8) Check Environment variables

[Email protected] application]# echo $PATH

/application/jdk/bin:/application/jdk/jre/bin:/application/jdk/bin:/application/jdk/jre/bin:/application/jdk/ Bin:/application/jdk/jre/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin :/root/bin:/root/bin

[Email protected] application]# echo $JAVA _home

/application/jdk

[Email protected] application]# echo $CLASSPATH

JDK installation method on Linux platform

Related Article

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.