LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-03-2014, 05:45 AM   #1
claud53
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Rep: Reputation: Disabled
Red Hat Enterprise Linux Server 5.7 Java installation


Dear All,

I am new to RHEL and I need some help to solve a situation I am experiencing. I need to uninstall java version jdk1.7.0_27 and install jre-7u40-linux-x64.rpm.
It seems like the jdk is installed manually by someone else and not using rpm.
When I type: which java the result is: /usr/java/jdk1.6.0_27/bin/java
When I type: rpm –qi jdk the result is: package jdk is not installed.

Can you help me with a step by step guide to uninstall the current jdk and install the new jre using .rpm?

Thank you in advance for your help!
 
Old 11-03-2014, 06:01 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,775

Rep: Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746
Try
Code:
rpm -qa |grep jdk
It is not uncommon to have multiple versions of java installed on a server.
 
Old 11-03-2014, 06:02 AM   #3
claud53
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
The command
rpm -qa |grep jdk

returns nothing
 
Old 11-03-2014, 06:07 AM   #4
claud53
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
I have followed the guide in this https://www.java.com/en/download/hel..._uninstall.xml and I found that:
ls /usr/java returns
default jdk1.6.0_27 and the file that I copied jre-7u40-linux-x64.rpm with the word latest at the end of the line.
default jdk1.6.0_27 jre-7u40-linux-x64.rpm latest


The command:
ls /opt returns
jdk-6u27-linux-x64.bin
 
Old 11-03-2014, 06:19 AM   #5
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,775

Rep: Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746Reputation: 746
The standard java for RHEL is openjdk. Are you sure that you want to install that jre?

If the version of java that you want to remove was installed from source then find the build directory and do
Code:
make uninstall
 
Old 11-03-2014, 06:22 AM   #6
claud53
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
From the above information could you please help to figure out if the java was installed from source and what is the directory? What is the correct command to remove it?
 
Old 11-03-2014, 06:24 AM   #7
claud53
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
ls /opt returns
jdk-6u27-linux-x64.bin

ls /usr/java returns
default jdk1.6.0_27 jre-7u40-linux-x64.rpm latest
 
Old 11-03-2014, 08:32 AM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
You can use the update alternatives command to use the latest.
https://wiki.debian.org/JavaPackage
 
Old 11-03-2014, 02:20 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,107

Rep: Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478
this is also the OLD and NOT updated rhel 5.7 !!!
the current java 1.7 rpm will likely not run on the old 5.7

OP can you post the output of this to verify it is 5.7 and NOT the current older legacy 5.11
Code:
su -
cat /etc/redhat-release
also seeing as this IS a RedHat server
you DO have the support contract and access to the redhat knowledgebase
the full install instructions ARE in the redhat database

login to the redhat site and search
https://access.redhat.com/search/bro...va&language=en
also you can read the install instructions

https://access.redhat.com/documentat...erprise_Linux/ in the redhat docs
 
Old 11-04-2014, 03:11 AM   #10
claud53
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
Hi John

The version of RHEL Server I have is 5.7 (Tikanga) and the subscription is expired. Thats why I was asking for help.

I know that the version of java that was installed in my machine by someone else id jdk1.6.0_27 and the location is /usr/java/jdk1.6.0_27/bin/java.

When I try to find the package rpm -qa jdk the system returns nothing.

ls /opt returns
jdk-6u27-linux-x64.bin

ls /usr/java returns
default jdk1.6.0_27 jre-7u40-linux-x64.rpm latest

Is this a self-extracting package installation or not?

Thank you
 
Old 11-04-2014, 03:33 AM   #11
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 620

Rep: Reputation: 142Reputation: 142
Hi Claud53,

As JohnVV has pointed out you are using an out of date version of RHEL with no support. Typically there is little point using this release.

Could you tell us your circumstances pls? Like do you have to use this version? It may be that there are other recommendations which could make your life easier. Centos is the free version of RHEL and you can install V7.0 should you desire.

Cheers
 
Old 11-04-2014, 08:02 AM   #12
claud53
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
I have to use this version. This is why I am asking for help.
 
Old 11-04-2014, 12:39 PM   #13
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,107

Rep: Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478
you might be able to get the current 1.6 java .bin to install
( read the install instructions on the Oracle web site)

/opt is a normal install location for manually installed code

but you will need to point software to it's location

i doubt that 1.7 will even run on that old OS , it might ???

Quote:
jdk1.7.0_27 and install jre-7u40-linux-x64.rpm
forget about using the rpm
it is GOING to error with unsolved DEPENDENCIES
it is for RHEL 6.6 and NOT the old 5.? series


have you searched the redhat knowlagebase ?
---

login to the redhat site and search
https://access.redhat.com/search/bro...va&language=en
also you can read the install instructions

https://access.redhat.com/documentat...erprise_Linux/ in the redhat docs

the install instructions ARE there for using the bin file
but
you have to login to the redhat site with the credentials you set up when you BOUGHT!!!
the REQUIRED!!! support contract !!!



one of the issues is java is GOING!!!!!!! to NEED some fonts installed
and they ARE IN THE REDHAT REPO!!!!!!
"liberation-fonts"
and to install them you NEED the required support contract from redhat

or
install the free alternative
CentOS
but again 5.7 is and HAS been unsupported
5.11 is the current version

http://wiki.centos.org/HowTos/JavaOn...ght=%28java%29
 
Old 11-04-2014, 01:38 PM   #14
claud53
LQ Newbie
 
Registered: Nov 2014
Posts: 10

Original Poster
Rep: Reputation: Disabled
According to the Java 7 System Requirements Redh Hat supports it.
Are you sure that it isn't supported?

http://java.com/en/download/help/sysreq.xml


Linux

Oracle Linux 5.5+
Oracle Linux 6.x (32-bit), 6.x (64-bit)3
Oracle Linux 7.x (64-bit)3
Red Hat Enterprise Linux 5.5+, 6.x (32-bit), 6.x (64-bit)3
Ubuntu Linux 10.04 and above
Suse Linux Enterprise Server 10 SP2, 11.x
Browsers: Firefox 3.6 and above
 
Old 11-04-2014, 03:41 PM   #15
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,107

Rep: Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478Reputation: 2478
fallow step 3 in the cent wiki
3.2. Java for the developer and the server environment
BUT
you must have the required redhat support contract to install any needed things


and see the 1.7 warning for the older legacy 5 systems
http://wiki.centos.org/HowTos/JavaRuntimeEnvironment


your best bet is to install a supported operathing system
then use the already installed "icedtea" version of java
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help in installing java 1.6 on Red Hat Linux Enterprise 4.6 (64 bit) dejones44 Linux - Newbie 1 07-06-2008 03:02 AM
Installation doesn't recognize Red Hat Enterprise Linux ES installation cd bizkut Red Hat 2 08-15-2004 08:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration