OT:LINUX NEWBIES,want to know how to install linux programs

C

CHarneyCHRIS

The followings are different types of compression that you might see under
linux.

1. .gz
2. .tar
3. .Z
4. .cpio
5. .zip
6. .bz2
7. .rar (need unrar for Linux)
8. .rpm (will be covered later)

Anything else?

II. How to truly find out which archive it is?
==============================================

Simply type: file filename.extension at the console then it'll tell you which
archive format the file has.

III. *Unzip* them
==========================

1. For .gz archive file, usually ended with .gz, so the filename should be like
this: filename.gz.
to unzip these types of file, simply type: gunzip filename.gz

2. For .tar archive file, usually ended with .tar, so the file name should be
like: filename.tar.
To untar these types of file, simply type: tar -xfv filename.tar

NOTE: the -v option is for verbose and it prints all the filenames being
extracted. It is not recommended
that you use this option for large files because it will somewhat slow down
your process by both displaying
the filenames and decompress at the same time. So if you have a big file, just
type: tar -xf filename.tar.

3. For .tar.gz file, type: tar -xfvz filename.tar.gz

4. For .Z file, type: uncompress .Z

5. For .zip file, you need to get the zip utility for linux and then type:
unzip filename.zip

6. For .bz2, type bzip2 -d filename.bz2, or bunzip2 filename.bz2

7. for .rar, first get the rar utility for Linux, then type: unrar filename.rar

8. For .rpm, this is just like a setup.exe in Windows, where all files are
being precompiled and ready to install
on you machine. The followings are basic operation for a rpm file.

a. Install: rpm -ivh filename.rpm
b. Upgrade: rpm -Uvh filename.rpm
c. Uninstall: rpm -e packagename
d. Query a package name when you know the package name: rpm -q apache
If you don't know the package name and wanted to see what packages include that
name do:

rpm -qa|grep somethinghere, for instance I would like to find out about apache
I'll do
rpm -qa|grep apache
e. To check see which package a file belongs to do: rpm -qif
/location/of/the/file
f. To see the content of the rpm: rpm -qlp filename.rpm

IV. Installing Source-code software
==========================================

1. Get the source code package, often ended in .tar.gz.
2. Uncompress them: tar -xfvz filename.tar.gz
3. It'll usually create a directory like the package name.
4. Type: cd packagename
5. Type: ./configure or ./configure --help for help
6. Type: make (if not error occured in configure)
7. Type: make install (with no error occured in make)
8. If no options specified in ./configure, the default installation directory
is /usr/local. Therefore, just
change directory to /usr/local/newpackageinstall

V. The End
 
J

Jörg Volkmann

The followings are different types of compression that you might see under
linux.

1. .gz
2. .tar
3. .Z
4. .cpio
5. .zip
6. .bz2
7. .rar (need unrar for Linux)
8. .rpm (will be covered later)

Anything else?

Yes *.deb
II. How to truly find out which archive it is?
==============================================

Simply type: file filename.extension at the console then it'll tell you which
archive format the file has.

III. *Unzip* them
==========================

1. For .gz archive file, usually ended with .gz, so the filename should be like
this: filename.gz.
to unzip these types of file, simply type: gunzip filename.gz

2. For .tar archive file, usually ended with .tar, so the file name should be
like: filename.tar.
To untar these types of file, simply type: tar -xfv filename.tar

NOTE: the -v option is for verbose and it prints all the filenames being
extracted. It is not recommended
that you use this option for large files because it will somewhat slow down
your process by both displaying
the filenames and decompress at the same time. So if you have a big file, just
type: tar -xf filename.tar.

3. For .tar.gz file, type: tar -xfvz filename.tar.gz

4. For .Z file, type: uncompress .Z

5. For .zip file, you need to get the zip utility for linux and then type:
unzip filename.zip

6. For .bz2, type bzip2 -d filename.bz2, or bunzip2 filename.bz2

7. for .rar, first get the rar utility for Linux, then type: unrar filename.rar

8. For .rpm, this is just like a setup.exe in Windows, where all files are
being precompiled and ready to install
on you machine. The followings are basic operation for a rpm file.

a. Install: rpm -ivh filename.rpm
b. Upgrade: rpm -Uvh filename.rpm
c. Uninstall: rpm -e packagename
d. Query a package name when you know the package name: rpm -q apache
If you don't know the package name and wanted to see what packages include that
name do:

rpm -qa|grep somethinghere, for instance I would like to find out about apache
I'll do
rpm -qa|grep apache
e. To check see which package a file belongs to do: rpm -qif
/location/of/the/file
f. To see the content of the rpm: rpm -qlp filename.rpm

IV. Installing Source-code software
==========================================

1. Get the source code package, often ended in .tar.gz.
2. Uncompress them: tar -xfvz filename.tar.gz
3. It'll usually create a directory like the package name.
4. Type: cd packagename
5. Type: ./configure or ./configure --help for help
6. Type: make (if not error occured in configure)
7. Type: make install (with no error occured in make)
8. If no options specified in ./configure, the default installation directory
is /usr/local. Therefore, just
change directory to /usr/local/newpackageinstall

V. The End
Jörg

JV
 
G

Gary R. Schmidt

CHarneyCHRIS said:
The followings are different types of compression that you might see under
linux.

1. .gz
2. .tar
3. .Z
4. .cpio
5. .zip
6. .bz2
7. .rar (need unrar for Linux)
8. .rpm (will be covered later)

Yes, *.tgz, *.taZ, *.taz, and for completeness, *.z.

Most of these should be obvious combinations of the above, but the old
..z Huffman encoding may just catch soemone by surprise. (Yes, I know
that it's not on a vanilla Linux box, but it's still part od SysV).

Cheers,
Gary B-)
 
S

Scott

IV. Installing Source-code software
==========================================

1. Get the source code package, often ended in .tar.gz.
2. Uncompress them: tar -xfvz filename.tar.gz
3. It'll usually create a directory like the package name.
4. Type: cd packagename
5. Type: ./configure or ./configure --help for help

../configure --help

Won't always list just what variables the user can configure. Newbie
users should look at this script prior to compile. Doesn't require a
degree in brain surgery to see defined variables that might be
relevant.
6. Type: make (if not error occured in configure)
7. Type: make install (with no error occured in make)

Dangerous. More often then not you would do this as root. This can
overwrite system and or distro specific files. Better to test run
the install using make -n install. Will show the user just what
commands are going to be used to install the software. See man make.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top