Tuesday, October 10, 2006

Package installation in Linux

Well this article is meant for novices in Linux .....
For the starters most of the linux distros are classified based on the package manager they use.

RPM
RPM of Red Hat Packagemanager is the package-manger for Red Hat, Fedora,Mandriva/Mandrake,Centos,Suse etc.

DPKG
DPKG or Debian package manager is the ladder for Debian,Ubuntu,Kubuntu,Dam Small Linux, Knoppix, E-Live etc.

Portage
Well actually we can't define it as a package manger, its based on BSD's port system and is used by my favourite Gentoo :-)) ....Slackware is also of the same kind in terms that it compiles from source like gentoo but it dosen't use portage(well i have no idea wat is the package manger for slackware :O )....

OK WTF r all these ?
In the beginning there was the .tar.gz. Users had to compile each program that they wanted to use on their GNU/Linux systems(well gentoo n slackware users still do it) ..When Debian/Red Hat were created, it was deemed necessary that the system include a method of managing the packages installed on the machine. The name dpkg /rpm were given to the system. I'm not sure wheteher rpm came first or dpkg ..well its upto u to decide.
These packages can be deemed as prepackaged binary stuff for a defined system ..for instance for an i3b6 system the rpm package will be different from that for an amd64 system.because they are filled with pre-defined data for a particular system, unlike the tar.gz package s which are the source codes , and hence can be compiled on any system .. :)(yohooo gentoo wins here hands down)...but the problem with the source packages like tar.gz is that they take a lot of time to compile and install ...and above that manging different versions is a pain in arse ..hence the package managers became very famous ....as the rpm/deb packages are easy to handle and install compared to their lethargic source code bros ....

Ok how do I install an rpm package
Download the rpm package u want to install, for instance if you want to install firefox just search for firefox1.5.i386.rpm package(considering that urs is an i386 machine) .... type the following command in terminal

rpm -i firefox1.5.i386.rpm

That's it , pardon me if there's any mistake since it has been ages since i worked on a red hat system ...
i forgot to mention one can use an interface called yum if u don't wan't to manually download stuff from net ...unluckily i have never used it so i can't advice u on that ....

Wat the fkcu to do with dpkg
Well Debian users have a host of options to select from .Debian based user's should download a package with .deb extension just same as red hat users use.rpm package.Once u download the required .deb package type the following command in terminal
dpkg -i *.deb

Well that's for active guys who wanna give some pain to their fingers by browsing net for packages.For lazy bumps and intellectually superior guys like me i would suggest using apt-get.

more on apt on next blog ...... :)