Wednesday, June 1, 2011

INSTALLATION IN LINUX(REDHAT)

we come across basic commands we must also learn how to install packages in linux system then only we can make connect to internet and chat with our loved ones :p its just nearer to ur hand catch it up i will define some methods about how to install and how to know whether the package is installed or not ..lets we



LINUX PACKAGES :
       In most of cases its difficult to understand the file type for installation because we know that .exe is for windows installation thus but we lack in linux ,we are using s many linux flavours and each one uses different file systems and execution files i will explain it below for some flavours that i know


REDHAT  -  .rpm (redhat package manager)
UBUNTU -  db (Debian)
SUSE        -  rpm 
FEDORA  - rpm




okey most of them use rpm so i will list rpm commands




RPM COMMANDS :


To query a package :


COMMAND:


rpm  -qa  <package name>     -  to query installed packages




EXAMPLES :(TRY OUT THESE  AND NOTE THE DIFF) :


rpm -qa  nano   - (q  for query , and a  for all)
rpm -q nano
rpm -qa | grep -i nano  - ( i for case sencitive)
rpm -qa nano*
rpm -qf  http://<ipaddress>package name - (it shows the uninstalled packages )
rpm -q nano -i
rpm -q nano -l           
               
To verify a package:


COMMAND:


rpm  -Va   <package name>     -  to verify installed packages and returns only if error in main files






To update or upgrade a package:


COMMAND:


rpm  -Uvh   <package name> .rpm   - to upgrade that is overite existing one if any demage


  




okay lets we move on to install,



To install  a package:

COMMAND:

rpm  -ivh   <package name> .rpm


To uninstall  a package:




COMMAND:

rpm  -e   <package name>






most importantly if dependency error appear while installing it may recuire some extra files to be installed  before this file so if search for it and install first orelse if u doesnot recuire that just make --nodeps at the end of the command itwont prompt