Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software Package Management WeeSan Lee. Roadmap What is software package management? RPM YUM pkgtools.

Similar presentations


Presentation on theme: "Software Package Management WeeSan Lee. Roadmap What is software package management? RPM YUM pkgtools."— Presentation transcript:

1 Software Package Management WeeSan Lee

2 Roadmap What is software package management? RPM YUM pkgtools

3 What is software package management? A way to distribute software and configuration Eg. .tar.gz or tgz (Slackware) .rpm (Red Hat, Fedora, SUSE, …) .deb (Debian, Ubuntu) Meta-package manager  Locate packages on the Internet, download, install and analyze inter-package dependencies. eg. yum (rpm) apt-get (deb and rpm)

4 RPM Redhat Package Management To query what software packages have been installed  $ rpm -qa To query a software package  $ rpm -q emacs To install a software package  $ rpm -i emacs el5.i386.rpm Error: Failed dependencies: To uninstall/erase a software package  $ rpm -e emacs

5 RPM Disadvantages  Very primitive  Have to resolve software dependencies manually

6 YUM Yellowdog Update, Modified To find out what software packages have been installed on a system  $ yum list Installed Packages … gawk.i e15installed gcc.i e15installed … Available Packages … emacs.i e16base …

7 YUM To find out if emacs has been install  $ yum list emacs To install emacs  $ yum install emacs To remove emacs  $ yum remove emacs

8 Some Observations All software packages are installed to the following directories:  /usr/bin/  /etc/  /usr/lib/  /usr/include …… What’s wrong with this picture?  Too Window’ish - everything goes to system32  No idea which files belong to which packages What’s wrong with that?  Need to reinstall all packages when rebuilding a system

9 A Potential Solution? Each software package goes to individual directory, eg. /import/pkgs  emacs goes to /import/pkgs/emacs  gcc goes to /import/pkgs/gcc …… What’s wrong with this picture?  Need to setup a PATH for each package, eg. PATH=/import/pkgs/emacs/bin:/import/pkgs/gcc/bin: … It would be nice if …  /import/bin/emacs  /import/bin/gcc And …  PATH=/import/bin Wait a minute … this is the same problem as /usr !!!

10 pkgtools /import/pkgs/emacs  A placeholder for individual package, such as emacs /import/src/emacs-22.1.tar.gz  A place holder for the source code of the package Make soft-links /import/bin/emacs -> /import/pkgs/emacs/bin/emacs /import/etc/emacs.conf -> /import/pkgs/emacs/etc/emacs.conf * /import/include/ /import/info/ /import/lib/ /import/man/man1/emacs.1 -> /import/pkgs/emacs/man1/emacs.1 /import/sbin/ /import/share/emacs -> /import/pkgs/emacs/share/emacs * There is no emacs.conf

11 pkgtools To compile the source  $ gzip -cd /import/src/emacs-22.1.tar.gz | tar xvfp -  $./configure --prefix=/import/pkgs/emacs  $ make  $ make install To install/enable (make soft-links) emacs  $ pkginstall emacs To uninstall/disable (remove soft-links) emacs  $ pkgremove emacs To find out the info of a software  $ pkginfo emacs emacs-20.7 weesan ftp://ftp.gnu.org/gnu/emacs/ Wed Oct 16 18:02:26 PDT 2002 *

12 pkgtools Advantages? Disadvantages? Why /import? Why not /usr/local?  Similar reason why we have /usr/csshare

13 A side note: setgid on a directory $ ls -ld /import/etc  drwxrwxr-x 2 root installer /import/etc $ touch /import/etc/a $ ls -l /import/etc/a  -rw-rw-r-- 1 weesan weesan /import/etc/a $ chmod g+s /import/etc $ ls -ld /import/etc  drwxrwsr-x 2 root installer /import/etc $ touch /import/etc/b $ ls -l /import/etc/b  -rw-rw-r-- 1 weesan installer /import/etc/b

14 Conclusion rpm or.deb are too primitive yum or apt-get is good for default system installation pkgtools is good for:  Customized or local packages  /import can be mounted over NFS for sharing  Allow users to install software without root access


Download ppt "Software Package Management WeeSan Lee. Roadmap What is software package management? RPM YUM pkgtools."

Similar presentations


Ads by Google