CT320

CT320: Network and System Administration

Fall 2017

Software Installation

See this page as a slide show

CT320: Network and System Administration

Software Installation

Colorado State University
Computer Science Department

Original slides from Dr. James Walden at Northern Kentucky University.

Software Installation

What’s the problem?

made at imgflip.com

Package Manager Features

Any package manager must have:

UNIX Package Management Systems

Package

A package, in general, is a encapsulation of a program or programs. It contains:

More than one file

Some packages contain many programs. The Debian coreutils package contains 232 files, including these programs:

[ arch base64 basename cat chcon chgrp chmod chown cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false fmt fold groups head hostid id install join link ln logname ls md5sum md5sum.textutils mkdir mkfifo mknod mktemp mv nice nl nohup nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd readlink realpath rm rmdir runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf sleep sort split stat stdbuf stty sum sync tac tail tee test timeout touch touch tr true truncate tsort tty uname unexpand uniq unlink users vdir wc who whoami yes

deb

Debian (and hence Ubuntu (and hence Xubuntu)) uses *.deb files to hold packages.

dpkg

On Ubuntu, the most primitive package manager is Debian’s dpkg. I rarely use it directly.

Wrappers

There are many programs that provide a better interface than dpkg:

Using apt-get

  1. Install
  2. Uninstall
  3. Upgrade
  4. Query
  5. Verify

Installing a Package

  1. Check the package and the files it wants to install.
  2. Perform preinstallation tasks.
  3. Uncompress the files and copy them in the proper locations
  4. Perform post-processing tasks
  5. Update the database

Install Example

% sudo apt-get install zoo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  zoo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 74.5 kB of archives.
After this operation, 169 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ vivid/universe zoo amd64 2.10-27 [74.5 kB]
Fetched 74.5 kB in 0s (225 kB/s)
Selecting previously unselected package zoo.
(Reading database ... 225219 files and directories currently installed.)
Preparing to unpack .../archives/zoo_2.10-27_amd64.deb ...
Unpacking zoo (2.10-27) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up zoo (2.10-27) ...

Upgrading a Package

Uninstalling a Package

Remove a package, leave configuration files behind.

% sudo apt-get remove zoo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  zoo
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 169 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 225225 files and directories currently installed.)
Removing zoo (2.10-27) ...
Processing triggers for man-db (2.7.0.2-5) ...

Uninstalling a Package

Completely removes package from system, including configuration files.

% sudo apt-get purge zoo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  zoo*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 169 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 225225 files and directories currently installed.)
Removing zoo (2.10-27) ...
Processing triggers for man-db (2.7.0.2-5) ...

Dependencies

For example, a number of packages depend upon the cups package. Removing cups will remove several other packages:

% sudo apt-get remove cups
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  bluez-cups cups hplip printer-driver-gutenprint printer-driver-hpcups
  printer-driver-postscript-hp printer-driver-splix
0 upgraded, 0 newly installed, 7 to remove and 0 not upgraded.
After this operation, 5,688 kB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

Dependency Resolution

Just Testing

Verify that all installed files match the md5sum.

% sudo dpkg --verify
??5?????? c /etc/sudoers
??5?????? c /etc/default/rcS
??5??????   /usr/bin/xdg-open

Querying the Database

Maintenance

Do this every week or so:

    % sudo apt-get update
    % sudo apt-get dist-upgrade
    % sudo apt-get autoremove

upgrade vs. dist-upgrade

apt-get upgrade

Updates all packages currently on the system. Won’t remove old packages, or install new packages.

apt-get dist-upgrade

Like upgrade, but also intelligently handles changing dependencies with new versions of packages; has a “smart” conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. It may therefore remove some packages.

Modified: 2017-09-14T12:58

User: Guest

Check: HTML CSS
Edit History Source
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2015 Colorado State University
CS Building