0% found this document useful (0 votes)
11 views

How To Load JAVA Rpms On Linux Server

This document provides instructions for loading Java RPMs on a Linux server. It describes downloading the Java RPM files via FTP, making them executable, extracting and installing them in the proper directories, and configuring the Java alternatives to set the desired version as default. The key steps are: 1. Download the Java RPM files via FTP to /usr/local/java. 2. Extract and move the files to /usr/lib/jvm. 3. Configure the Java alternatives using update-alternatives to select and make the new version the default.

Uploaded by

viveksw
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

How To Load JAVA Rpms On Linux Server

This document provides instructions for loading Java RPMs on a Linux server. It describes downloading the Java RPM files via FTP, making them executable, extracting and installing them in the proper directories, and configuring the Java alternatives to set the desired version as default. The key steps are: 1. Download the Java RPM files via FTP to /usr/local/java. 2. Extract and move the files to /usr/lib/jvm. 3. Configure the Java alternatives using update-alternatives to select and make the new version the default.

Uploaded by

viveksw
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

How to load JAVA rpms on linux Server? -- Which version of JAVA available ?

-- Check using following command # rpm -qa | grep java -- This is another command to know which version .. also it tell you about 32bit or 64bit # rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep java -- Normally we store JAVA related rpms under /usr/local -- so create JAVA folder and ftp rpms from downloaded server -- We have downloaded java_rpms on 10.240.82.123 # cd /usr/local/java # cd /usr/local # mkdir java # cd java # ftp 10.240.82.123 # cd .. # ls # ls -lst java_rpms/ # ls -- Once FTP is over go to that folder on that server where you want to load new version # cd java_rpms/ -- Make the binary file executable using chmod a+x command so that we can run it. # chmod a+x jdk-6u22-linux-i586.bin -- Now run the file # ./jdk-6u22-linux-i586.bin

-- Check the extracted directory ... it would have created the folder of the same file name # ls -lst # cd .. # cd java # mv ../java_rpms/jdk1.6.0_22/ . # cd jdk1.6.0_22/ # ls # cd jre/ # pwd -- This is another version you have kept under folder -- and then you can export JAVA_HOME variable to point to this folder -- So you can hava both versions ( eg. 1.4 as well as 1.6 on the system ) # java -version # man rpm # cd .. # ls # find . -name *.rpm -print # cd .. # find . -name *install* -print # pwd # cd jdk1.6.0_22/ # cd /usr/lib # cd jvm # ls # pwd -- Now to permanantly install the latest version -- You need to execute following commands in given sequence only -# mv /usr/local/java/jdk1.6.0_22/ . -- Following commands will prompt you both the versions and allow you to set the required -- version --

# update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_22/bin/java" 1 # update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_22/bin/javac" 1 # update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.6.0_22/bin/javaws" 1 -- Last configuration of java -# update-alternatives --config java # java -version # update-alternatives --config javac # update-alternatives --config javaws # exit

You might also like