Department of Computer Science and Technology

Software installation on managed Linux machines

Users can manually add packages using one of the methods mentioned above. However, if the machine fails and has to be reloaded (or if the machine is to be cloned for another member of the group), these packages will have to be manually reloaded again unless records are kept to allow them to be installed automaticly. The names of bundles of packages to be added to a machine can be put into the file /etc/user-config/bundles and the standard management scripts will ensure the packages are added automaticly. The most basic "bundle" is a package name, e.g. "mplayer". The named package, and the ones on which it depends, will be loaded. The next level is to request all the packages in a "group" are added by having a line starting with an "@", then the group name, which normally starts with "R-", e.g. "@R-CL-basics" includes all the packages which are considered "basic" to convert a "std" install into one suitable for use in the Lab. Groups are a standard yum feature ("groupinstall", "groupremove") so RPM based systems use them. There isn't an equivalent for .deb systems, so they use files file, by default in /etc/manage-scripts/debs/.

It is also possible to request that a package (or file) not be loaded by prefixing it with "NOT_", e.g. "NOT_httpd" will request that the httpd package not be loaded. A sample /etc/user-config/bundles file using all three is:

#1 Load mplayer to view AVI files etc
#1 Load all the std basic CL packages
#1 No need for HTTP server, so save space etc

The command cl-update-system will arrange to do whatever updates it thinks are needed. This is automaticly run once on any day that the machine is running, but can also be run by the nominated user (i.e. the owner of /etc/user-config/bundles). If there is nothing to do, it generates no output. If it hangs, try running it with the "-t" flag which traces what it is doing as it does it. It is actually a script which does a number of things — those relevant here being to update all existing packages, and to check that there are no new packages to be installed due to the contents of /etc/usr-config/bundles.

Alternatively, you could run the constituent commands separately:

  • "cl-asuser apt-get update; cl-asuser apt-get upgrade": (.deb) ensure all installed packages are up to date.
  • "cl-asuser yum update": (RPM) ensure all installed packages are up to date. If this fails, it might be worth running "yum clean all metadata dbcache" to clean things up.
  • "cl-asuser cl-add-rpms -a": ensure all the bundled package as specified in /etc/user-config/bundles are installed. From time to time the bundles may change, and new packages may be added.