LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I install a .tar.gz file? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-install-a-tar-gz-file-352111/)

yourwar 08-11-2005 03:14 AM

How do I install a .tar.gz file?
 
I just downloaded gFTP and I was just wondering how I install this .tar.gz file?

Ephracis 08-11-2005 03:18 AM

Code:

tar xvzf gftp-version-and-stuff.tar.gz
cd gftp-version-and-stuff

Now there is a README in there, read it. By default you can do:
Code:

./configure
make
su
<password>
make install

Although, this may differ between different tarballs.

Lucas10 08-11-2005 03:23 AM

Use a console

cd to your gFTP
type gunzip gFTP
type ls
type tar -xvf "file you have created with gunzip"
type su and enter your password
type ls and read the readme file or something similar with the command more

hope it will help
I'm a newbie too

Ephracis 08-11-2005 03:49 AM

Just a note: do not get confused because both what I wrote and what Lucas10 wrote.

To clarify for new ones:
You can either do gunzip file.tar.gz and then tar xvf file.tar and it will work. This is what most readmes will tell you to do. But if you add the "z" flag to tar you do not need to gunzip before: tar xvzf file.tar.gz. If you have a tar.bz2 instead of a tar.gz you just change the z flag to a j flag: tar xvjf file.tar.bz2

EDIT:
More clarifications:

I use "tar xvzf" but default is actually "tar -xvzf", it does not matter in this case, but most programs need that extra -

The flags to tar:
x stands for extract
v is verbose
z/j is for gz or bz2
f stands for file (you need this one)

More info about this: man tar

A good practise to keep your structure clean is to make a "source" directory somewhere (in you home maybe?) and then cd into it and do tar /path/to/downloaded/package.tar.gz this will unpack the package in the directory where you are, but use the file from the downloaded directory. Sanitize your structure. ;)

SlackerLX 08-11-2005 03:52 AM

It's also recommended to run
#make clean
right after "make install'
:cool: :cool:

theYinYeti 08-11-2005 04:38 AM

In most cases, it is better to install software using your distribution's repositories and tools (urpmi, yum, apt...). If you still want to install software from source, I wrote a small article on the subject, you might be interested in:
My site > Computing > Linux > Software/installation.

Yves.

SlackerLX 08-11-2005 04:49 AM

Very comprehensive manual, Yeti!
You could bookmark it here on linuxquestions

theYinYeti 08-11-2005 04:55 AM

Thank you very much for those kind words :)
Thing is I want to keep my work all in one place (my site), as I participate in several forums, and help by mail on occasions. I don't want to repeat myself too often, hence those articles I began to write.
LQ rules don't allow for "advertising" so I keep links to a minimum.

Yves.

SlackerLX 08-11-2005 05:01 AM

In recent Radio show jeremy invited people to post their important material in LQ Bookmarks
http://bookmarks.linuxquestions.org/.../tags/tutorial

mani_iips 08-11-2005 08:18 AM

In source package we get the full source code for the respective application and we have to install it directly from the source code for which we have certain files in the package itself. Installing from source consists of these steps:
a) copy the package in a desired (any) directory, and extract it
Code:

                tar -xvzf  *.tar.gz
              OR
                tar -xjf  *.tar.bz2

b) this will extract the files in a new directory (within the same path), now u need to compile and install these files, u can also read the README or INSTALL file in the extracted directory.
Code:

cd (directory in which extracted)
c)
Code:

rpm -i package-name
this will check if the files necessary for installation are available

d)
Code:

make
this will compile the package

e)
Code:

make install
will install the executable in /usr/local/bin

Now your software is installed and u can run it
Hope ir helped.
cheerio.

SlackerLX 08-11-2005 08:50 AM

#make clean
after "make install" command to save space and remove temp file

b0nd 08-11-2005 09:02 AM

Quote:

In most cases, it is better to install software using your distribution's repositories and tools (urpmi, yum, apt...).
me too agree with you "the Yin Yeti"
i've apt.....but could not found yum.......and listeining urpmi for the first time.....
could you please suggest some links to get them.

regards

Ephracis 08-11-2005 09:40 AM

Quote:

Originally posted by mani_iips

c)
Code:

rpm -i package-name
this will check if the files necessary for installation are available

Since he is on a Debian system this will not work.

theYinYeti 08-11-2005 10:16 AM

"apt" is a tool for Debian, and is a layer above "dpkg".
"urpmi" is for Mandrake and is a layer above "rpm". It was I think the first tool to bring the "rpm-system" up to the ease-of-use level achieved with "apt" for the "dpkg-system".
"yum" is for Fedora/Redhat, and is also a layer above "rpm".

Yves.


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