TimeLinux1

Tuesday, October 12, 2010

Linux HowTo: Package Repositories and Commands

Contemporary Linux is based on two main camps of Software Package Types. One is based on the Red Hat Packages and the other on Debian. The popular Linux offering from Canonical called Ubuntu is based on the Debian packages. It was originally derived in 2004 from one of the Debian unstable releases and named 'Warty Warthog'. A new release is made available every 6 months; the latest one being 'Maverick Meerkat'. Here we discuss some commands to manage the packages in Linux..

===

-config file for client update repositories in ubuntu:
        . /etc/apt/sources.list
-pkg install dir in ubuntu:
        . /var/cache/apt/archives
-dpkg -l  =  rpm -qa = lists installed packages
-dpkg does not resolve dependencies.
-apt-get resolves dependencies.
-to update local package database (in /var/cache/apt/archives?):
        # apt-get update
-to compare against available upgrades:
        # apt-get upgrade
-to review available repositories:
        # apt-cache depends <pkgname>   
-note: apt-cache depends on the freshness of repositories, which is done by 'apt-get update'
-to review available repositories from install cdrom
        # apt-cdrom
-repository types:
        . main        - opensource, supported by cano
        . restricted    - proprietary, supported
        . universe    - opensource, not supp by cano, supp by wider ubuntu opensrc cmomm
        . multiverse    - proprietary, not supp by cano.
-local directories (or even ftp, http, nfs dirs) can be created as repositories.

-local repositories are configured in /etc/apt/sources.list
-it has cmds in pairs like this:
        . deb http://...        -specifies location for binaries
        . deb-src http://...        -specifies location for source code
-repository types are main, restricted, universe, multiverse.
-software downloads from mirror sites is possible in http, ftp or rsync.
-to open software download dialog:
        # software-properties-gtk
-alternate graphical methods:about:home
        # synaptic
or     # update-manager
-synaptic reload button = apt-get update equivalent
-above cmd updates the rep db /var/cache/apt/archives based on repos in /etc/apt/sources.list   

-sometimes it is advisable to setup a local network mirror which serves hosts in a lan.
-such a local mirror can be updated infrequently to a remote mirror using:
        . apt-mirror    to
 or    . rsync
-to create local mirror:
        # apt-get install apt-mirror       
        . configure /etc/apt/mirror.list & set the var base_path which points to local rep.

No comments:

Post a Comment