LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to install a .tar.bz2 file (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-a-tar-bz2-file-845984/)

th_matt 11-23-2010 04:26 AM

How to install a .tar.bz2 file
 
I am using linux for the first time. My linux distribution is RedHat 5.4 on a VMWare. On this machine, I went online and downloaded mozilla firefox.

The file I received is firefox-3.6.12.tar.bz2. I have tutorials on how to install from the rpm and yum commands, but these do not help when installing a .tar.bz2 file. Please explain how I can install this file.

acid_kewpie 11-23-2010 04:34 AM

I would advise that you don't install it. Just get an rpm instead. or on rhel, "yum install firefox" will get you the latest official version as packaged by redhat for security and stability.

Note that you don't "install" tar.bz2 packages, it's a generic archive, and I'm sure you wouldn't ask how to install a zip file, right? exactly the same here.... you would decompress it... "tar jxvf blah.tar.bz2" and then go into the directory that is created and then install in there from whatever mechanism is provided, of which there are many many options, including totally bespoke ones that can be unique to that package. (i.e. just like it can be on windows)

T0sh1r0 11-23-2010 04:36 AM

You should try to install via the standard package management system of your distribution. It's always safer and easier. I am not using Fedora but I guess somewhere in the menu you should find the package manager. Open it and look for firefox there.

FYI, the file you downloaded is an archive. You should be able to open it with the tar command. The best is to look a the documentation (in a console type
Code:

man tar
)

prayag_pjs 11-23-2010 04:40 AM

I think you are using RHEL which doesn't support yum free of cost.Better install CentOS or Sceintific Linux if you not using legal copy of RHEL.

For installing any source do this as root
Code:

tar -jxvf firefox-3.6.12.tar.bz2
Code:

cd firefox-3.6.12
Code:

./configure
Code:

make
Code:

make install

acid_kewpie 11-23-2010 04:54 AM

Quote:

Originally Posted by prayag_pjs (Post 4167974)
For installing any source do this as root
Code:

tar -jxvf firefox-3.6.12.tar.bz2
Code:

cd firefox-3.6.12
Code:

./configure
Code:

make
Code:

make install

Disclaimer... this is NOT the "normal" way to install software as and end user / newbie, you do not really want to do this by default *unless* you know you need to.

repo 11-23-2010 04:56 AM

The best way is to use the package manager or the rpm file.

You don't need to compile firefox.
Just untar the archive, cd to the created directory and start firefox
In general I install firefox in /opt (when I want a more current version then the package manager provides, or to test the beta version)

Code:

cd /opt
tar -jxvf /path/to/firefox-3.6.12.tar.bz2

to start firefox
Code:

/opt/firefox/firefox
Kind regards

acid_kewpie 11-23-2010 05:34 AM

Quote:

Originally Posted by repo (Post 4167989)
You don't need to compile firefox.
Just untar the archive, cd to the created directory and start firefox

Well exactly....!
Quote:

Originally Posted by acid_kewpie (Post 4167970)
Note that you don't "install" tar.bz2 packages, it's a generic archive, and I'm sure you wouldn't ask how to install a zip file, right? exactly the same here.... you would decompress it... "tar jxvf blah.tar.bz2" and then go into the directory that is created and then install in there from whatever mechanism is provided, of which there are many many options, including totally bespoke ones that can be unique to that package. (i.e. just like it can be on windows)


th_matt 11-23-2010 05:34 AM

Thank you Chris for explaining that you dont install a .tar.bz2 file and repo and Prayag for the tar command options (-jxvf).

Chris you advised getting an rpm instead of the archive file to install firefox. Please let me know where I can get this. I searched the Mozilla Firefox site but could not find it. If there is a link to the RPM, please paste it here.

Oh and also, wierdly, when I start firefox, it opens the firefox that is installed with RHEL (an older version) and not from the unzipped directory. (I do a cd to the unzipped directory and just type in firefox in terminal)

acid_kewpie 11-23-2010 05:42 AM

Well as prayag_pjs pointed out, you are in a dubious situation running RHEL. You are either commercially licensed, and therefore can install from RHN, or you are not licensed and therefore have no formal repositories to go to. If you are not licensed then that's not illegal, but a pointless position to be in, and I woudl recommend switching to CentOS instead. This is actually *very* simple to do though, just install the CentOS-release RPM to replace the installed redhat-release package and it will (afair) configure the system to use CentOS online repositories with yum automatically. Your installation logos and other frilly nonsense like that will change, and it will report that it is now a centos system, not redhat, but the binaries are fully compatible and given that you already have no commercial support you will be in a better position by far. And then you can just run "yum install firefox" and have it work just fine. This is not a risky thing to do, it is not dangerous. You can also go online and search for somethign like "firefox rpm el5" and you can just grab the centos rpm there and it will install just fine on RHEL with "rpm -Uvh firefox.rpm"

repo 11-23-2010 06:07 AM

Quote:

Oh and also, wierdly, when I start firefox, it opens the firefox that is installed with RHEL (an older version) and not from the unzipped directory. (I do a cd to the unzipped directory and just type in firefox in terminal)
When you are in the directory containing the file you want to execute, use
Code:

./firefox
Code:

firefox
will execute the firefox in your PATH, eq the old version installed.
./ will execute the file in the current directory.
or from any location
Code:

/path/to/firefox
Kind regards

Deelen 11-23-2010 07:18 AM

registration posting

acid_kewpie 11-23-2010 07:30 AM

Quote:

Originally Posted by Deelen (Post 4168161)
registration posting

Hey there! Don't do this! It makes you look like a spammer!

kelbrosi 11-23-2010 09:15 AM

hi,, how to replace the old firefox, becouse now i have two version firefox installed in different place,,

acid_kewpie 11-23-2010 09:32 AM

Quote:

Originally Posted by kelbrosi (Post 4168271)
hi,, how to replace the old firefox, becouse now i have two version firefox installed in different place,,

No thread hijacking please. your question - your thread.

prayag_pjs 11-23-2010 10:54 PM

To query for rpm installed in the system

Code:

rpm -qa | grep -i firefox

When you get the rpm using above command


To remove rpm command is


Code:

rpm -e --nodeps firefox


All times are GMT -5. The time now is 12:52 AM.