How do I extract the a RPM file from a bin file? (Redhat Linux)

LastStop

Senior member
Mar 11, 2002
268
0
0
So I go to sun.com and dl the JRE for Redhat and it's a .Bin file. How do I go about installing the RPM if it' has a .bin extension and that KDE doesn't recognize it?
 

manly

Lifer
Jan 25, 2000
12,916
3,687
136
The .bin file is just a tar/gzipped file wrapped in a shell script. Set the file executable and run it to decompress the Java2 RE (into the current directory). For example:

# Unpack as user
$ chmod u+x /path/to/j2sdk-1.4.0_01.bin
$ mkdir /tmp/j2sdk-1.4.0
$ cd /tmp/j2sdk-1.4.0
$ ./j2sdk-1.4.0_01.bin

# Install as system JRE as privileged user
$ su
# mv /tmp/j2sdk-1.4.0 /usr/local
# chown -R root.root /usr/local/j2sdk-1.4.0

Only thing left is to add /usr/local/j2sdk-1.4.0/bin to your users' PATH or build environment. Installing the Java2 Plugin into your web browser is a separate, optional step as well.

You can download an .rpm version (not the .bin) but historically the .rpm offers minimal advantages.
 

EmperorRob

Senior member
Mar 12, 2001
968
0
0
I think the .bin jre I d/l-ed from Sun was just a EULA which prompted yes or no as options and when you choose yes it deflates into an RPM. Then you can take it from there.
 

Abzstrak

Platinum Member
Mar 11, 2000
2,450
0
0
How exactly do I run the script file? I double click it and nothing happens.

Linux is not a GUI, stop using the GUI and use the CLI... you may need to chmod it if not executable
 

ParagonX

Member
May 20, 2002
114
0
0
I'm a linux newbie myself so i may be wrong here...

you need to go into the shell first of all and 'cd' into the directory the file is in...

then: chmod 755 file.bin
then: ./file.bin
 

TonyRic

Golden Member
Nov 4, 1999
1,972
0
71
Using chmod in 1 way but a little more clunky than using:

sh file.rpm.bin

edit: I believe Sun has the instructions on how to install this on their web site.