TimeLinux1

Sunday, February 6, 2011

Linux: Package Management

In Linux, software management--adding, modifying, removal of programs -- is simplified by grouping the programs in what is called packages.

-linux uses packages to manage software. Two main types--rpm and deb.
-main advantage of pkgs over tarballs is that the former is structured and simpler.
-pkgs allow dependencies and localization (site specific pkgs) to be included.

-to convert between rpm and deb pkgs, the program called 'alien' is used.
-alien knows nothing about the software inside the pkg.
-so if contents are incompatible with the system, alien wont help.
-so, its best to stick to native pkging to the distrib.

-useful rpm options:
    . rpm -q, -i, -U, -e
-eg:    # rpm -q --whatrequires openssh            [ like --depends option ]

-useful deb options:
    . dpkg -l, --install, --remove

-on top of rpm and deb pkg cmds exist the pkg systems 'yum' and 'apt'.
-yum works with rpm pkgs only where as apt works well with both rpm and deb pkgs.
-these pkg systems make pkg mgmt very easy, esp by resolving dependencies on the fly.
-pkg systems need a connection to the repositories that usually exist on the Internet.
-rhn (redhat network) uses yum internally. it is a paid service.
-yum became the default standard for pkg mgmt in redhat world with rhel5.
-the config file for yum is /etc/yum.conf

-apt is more well documented than yum.
-apt-get is configured via the file /etc/apt/sources.list.
-after configuring this file, to install a pkg:
    . refresh apt-get's cache by     'apt-get update cmd.
    . then install the pkg by    'apt-get install pkgname' cmd.

-on ubuntu, universe component is advisable instead of multiverse.
-universe has opensource s/w whereas multiverse can have non-opensource content (like vmware).

-localized pkgs are managed by a dedicated mirror site.
-to create mirror:
    . install pkg apt-mirror        then
    . configure /etc/apt/mirror.list    then
    . run apt-mirror as root
-first run of apt-mirror can take a long time as it has to download about 40+ GB of repository data.
-subsequent apt-mirros are quick and can be scheduled via cron.

-software install and packaging is an area in which linux is clearly superior than unix.

No comments:

Post a Comment