Wednesday, February 15, 2006

Installing Software in Linux

Linux usually complies the code to install a software. But to save time of the user there are also some pre build packages available called binary files (.bin).They are pre compiled and takes lesser time to get installed.
If you want to install from source code then you can find the tarball (zipped) of those softwares. So first we need to unzip that using command "$tar -xvzpf or tar -xvjpf". We will find a configure file in that directory. Run that configure file and then to complile we need to use "make && make install" command.

RPM (RPM Package Manager)
A RPM package contains a library of files with the description of the location where the files have to be copied. It also contains a general description of the package. An other interesting characteristic of RPM is that he checks for dependencies.

The command rpm (Install RPM package using konsole)

* To install sanjay.rpm, type
rpm -ivh sanjay.rpm
*Remeber it will install the package not upgrade the package.

* To uninstall the package sanjay, type
rpm -e sanjay

* To query information about the package sanjay (already installed), type
rpm -qi sanjay

* To query information about the package file sanjay.rpm, type
rpm -qip sanjay.rpm

* To query the file listing in the package sanjay, if already installed, type
rpm -ql sanjay

* To query the file listing in the package file sanjay.rpm, type
rpm -qlp sanjay.rpm

* To update the package sanjay, type
rpm -U sanjay.rpm

* To identify the package whose the file sanjayfile is belonging, type
rpm -qf sanjayfile

* The one which always works (90%case)
rpm -Uvh sanjay.rpm

Tar.gz Package:

An archiving program designed to store and extract files from an archive file known as a tarfile

* You will basically find two type of tar files tar.gz and tar.gz2

* To unzip tar.gz we can use
tar -xvzpf filename.tar.gz

* To unzip tar.gz2 we can use
tar -jxvf filename.tar.gz2

* After that a directory will be formed in which you will find a file named "configure". Now you need to compile that file. you can compile it using the command

make

* After compiling (make) you need to install that we can do that using command

make install

* So in short we need to do as following

tar -xvzpf filename.tar
cd filename
./configure
make
make install

* This will work for most of the cases

You can mail me personally at sansor@iitk.ac.in and can visit website which is daily updated by me http://www.geeksclass.tk or www.linux4u.co.nr

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home