[In addition to this article, be sure to read the file called README for any late-breaking news on using the CD-ROM. -LM]
The CD-ROM that comes with this book can be used in two different ways. First, it can be mounted just long enough for software to be copied onto a local hard disk. In this respect, it is a distribution medium similar to magnetic tapes or floppy disks. Second, it can be mounted so that it is always present and available as a local read-only hard disk. It will appear as a filesystem and you can use familiar UNIX commands to peruse it.
The Power Tools CD conforms to the ISO standard 9660. This is sometimes called "High Sierra," but there are differences between the two formats. The 9660 standard is what most CD-ROM drivers will support from now on, even though they will read High Sierra discs.
For UNIX users, ISO 9660 may come as a shock. For example, a directory listing of an ISO 9660 disc might look like this:
ISO 9660 specifies that the filenames are mono-case, and limited to 8 characters with 3-character extensions. If the filename doesn't contain a dot, one is added at the end of the filename. A "version number" is also appended, following a semicolon (version numbers are used in some non-UNIX filesystems such as VMS). Some systems do not use all these features, so there are several variations that you will encounter.
For example, a file called install.pt may appear as any of the following, depending on what system you mount the CD-ROM on:
INSTALL.PT;1 INSTALL.PT install.pt;1 install.pt
Directory names are simply 8 characters or less and mono-case. A directory called "SOURCES" can appear as SOURCES or sources . ISO 9660 also limits directory depth to 8 levels.
Note that the semicolon character (
INSTALL.PT: Command not found. 1: Command not found.
Luckily for you, we provide installation software that hides most of this ugliness.
The CD-ROM device name varies depending on the type of system. If you do not know the device name, consult the documentation that comes with your system. On some systems, the SCSI ID of the CD-ROM device can vary. The SCSI ID will be part of the device name - for example, /dev/rz3c/ is the CD-ROM at SCSI ID 3 on a DECstation.
The mount point is simply a directory that will become the parent directory of the CD-ROM when it is mounted.
Most systems do not provide a way for unprivileged users to mount the CD. It is probably necessary to mount and use it as the. For this reason, the bulk of this article assumes some knowledge of system administration and superuser commands. You may need to have your system administrator install the power tools software for you.
As the CD
is read-only, you may have to specify this fact to the mount
it will generate an error if it tries to open the CD-ROM device for
Some systems also need to be told the type of filesystem
being mounted if it is not the default (usually
For example, the CD can be mounted on a SunOS 4.1.1 system with the command:
mount_hsfs: must be mounted readonly mount: giving up on: /cdrom
If you omit the filesystem type of
mount: /dev/sr0 on /cdrom: Invalid argument mount: giving up on: /cdrom
The procedure for mounting a CD-ROM varies with each type of operating system. You should consult the manual pages for the mount command and look for a mention of CD-ROM, ISO 9660, or High Sierra:
Some examples of mount commands for the supported systems are:
An example of a mount command on another system is:
Once you have the CD-ROM mounted, you can run the installation program to copy pre-compiled binaries off the CD and onto your system's hard disk. The installation program is Ready-to-Run Software's "Smart Installation System."
There are two software installation programs provided on the CD. The first program "installs" pre-compiled binaries. The second program "builds" programs from source code. If you have one of the supported platforms, you can install software off the CD-ROM and use it immediately. If your platform is not one of the supported platforms or you wish to change the software in some way, you should be able to .
The pre-compiled binaries may work on operating system versions slightly older or newer than the ones listed here. Some programs take advantage of features that are not supported on all the platforms. The install program will tell you if a program is not available for your platform.
If you are uncertain of your operating system version, the uname command may help:
If your platform is not listed, you should try building the programs from source code as described in article 52.8 .
There is a standard installation structure for all packages on the CD-ROM. Using this structure (and some simple variations of it), you can tailor how and where your packages will be installed on your system.
The basic directory structure is shown in Figure 52.1 .
Some packages may deviate from this structure by having extra directories at the <install_dir> level.
Shareable files are those files that are machine independent and can be shared across many machines in a network using a . These are typically text files, such as manual pages or "include files." Sharing files reduces the amount of disk space required by allowing several different systems to use the same set of files, as opposed to having to duplicate them for each machine. It also simplifies administration of the files by having only a single copy to maintain.
Non-shareable files are machine/architecture specific and may not be shared (except with other hosts of the same architecture). These are typically binaries or data files that depend on a certain architecture or byte order.
The installation program gives you the ability to split the shareable and non-shareable files into separate directories. Using this scheme, you could put shareable files onto a partition or directory that is mounted by multiple machines.
If you want to store shareable and non-shareable files at the same directory level, the shareable directories will be preceded by a leading s to mark them as "shareable." For example, sbin is shareable, while bin is non-shareable.
 Figure 52.2 shows how the default installation directories are arranged.
You can modify this structure using the Smart Installation System and any necessary directories will be created (if you have permission to do so).
In order to run the software after installation, you will need to make sure that your shell path variable includes <install_dir>/bin (and possibly <install_dir>/share/bin if you choose to use this structure). For example, if <install_dir> is set to /usr/local , set youras appropriate for your shell:
The installation software will automatically print out a suggested path when it finishes installing a program.
Then change directories to the mount point you specified for the CD-ROM and see what is there. In our case, we specified /cdrom as our mount point:
The output could look slightly different depending on the type of system:
ALPHA/ CONFIG1 HP700/ INSTINFO/ RS6000/ SUN4C/ BUILD.PT* CONFIG2.REV I386/ LINUX/ SOURCES/ COMMON/ CONFIG3.Z INSTALL.PT* README SSOL2/
One of the first things that the installation program will do when installing software is to copy the programs into a "staging" area. By default, this is the directory /tmp . By setting the environment variable TMPDIR to another directory, you can alter this location.
For example, if you want to use the directory /mondo for the staging area:
Once you have the CD-ROM properly mounted, run the appropriate install command for your system. For example:
The installation program will display menus and prompt you for input from now on. It will also try to guess the type of machine you are running it on and the mount point of the CD-ROM:
Assuming CDROM is mounted at /archive/cdrom Assuming MACHINE is ALPHA Welcome to Ready-to-Run Software's * Smart Installation System * This installation system requires write permission in /tmp (or $TMPDIR if it's set) directory (for staging the install) and write permission in the installation directory for the actual install (these may be the same). ...
Use umask of 022 instead of 007 for install [y]? y
This will affect the permissions of the software when it is installed. The suggested value of 022 will allow anyone to execute or read the programs, but gives write permission only to you.
The install program will then present a list of the available software:
The PowerTools2 package contains the following scripts: ! 80cols Clear _emacs_ml _enter_csh _enter_sh _exit_csh _exit_sh addup age_files ascii awf behead bkedit cal_today catsaway center cgrep ... The PowerTools2 package contains the following packages: bash bitmaps bsdtar bsplit calen cpmod cvtbase delete diff ediff emacs fgrep fileutils find gawk getopt glimpse grabchars ...
After the names of the software packages have been displayed, you are prompted for which ones to install:
Enter the name of a package to install or choose Search, Quit or All <package>, S(earch), A(ll), Q(uit) [Search]?
You can now type the name of the package, search for packages, quit the installation program, or install all packages in one fell swoop.
For this example, let's assume you are looking for programs that do something
with terminals, but you don't know what they are called.
You can use the
"Search" function at the main menu to look for you.
Just press RETURN at the prompt, as the "Search" is the
default action in the square brackets (
<package>, S(earch), A(ll), Q(uit) [Search]? s
Then type in "terminal" for the search keyword:
Search package descriptions for (? for help) ? terminal
All packages matching this description will be displayed:
The descriptions for the following packages mention "terminal": 1. Clear 2. emacs 3. qterm 4. screen 5. tcap 6. termtest 7. tputinit A. ALL N. NONE Choose one please:
For this example, the qterm program is selected, which is option 1:
Choose one please: 3
A description of the program is now displayed:
qterm - version 5.0 Version 5.0 Qterm is a program that queries terminals to find out what kind of terminal is responding. It is useful to automagically define your terminal type. It prints the name of the terminal (compatible, hopefully, with a termcap/terminfo name) such as "vt100" to standard output. The qterm package is approximately 64Kb 32Kb - Required 15Kb - Shared: Formatted Man pages 3Kb - Shared: Other Shareable files 13Kb - Shared: Unformatted Man pages Install qterm [y]? qterm was compiled and made "Ready-to-Run" by Ready-to-Run Software, Inc. Copyright (c) 1990 Michael A. Cooper. This software may be freely distributed provided it is not sold for profit and the author is credited appropriately. Power Tools distribution by permission of the author. ************************
After information about qterm is printed, you are told how much space it will require and then asked whether you want it installed. Press RETURN to install it, or "n" for "no" (followed by RETURN) if you don't want it installed. For our example, we want qterm installed, so we just press RETURN.
The qterm package is approximately 56Kb 24Kb - Required 15Kb - Shared: Formatted Man pages 3Kb - Shared: Other Shareable files 13Kb - Shared: Unformatted Man pages Install qterm [y]? [RETURN]
Any copyright information for the qterm package is printed out now:
qterm was compiled and made "Ready-to-Run" by Ready-to-Run Software, Inc. /* * Copyright (c) 1990 Michael A. Cooper. * This software may be freely distributed provided it is not sold for * profit and the author is credited appropriately. */ ************************
You are then prompted with
installation questions, with the default answers printed within square
The first question is where to install the software. The installation program assumes /usr/local as the default installation directory. If you want to change the default, type the name of a different directory here. This directory will now be used when you are prompted for the same information in all subsequent packages.
Install package at dir [/usr/local]?
The next question is where to install the shared files for the package. The default is to use a share subdirectory of whatever directory you specified in the previous question.
Install shared files at [/work/tools/share]? [RETURN]
Third, you're asked whether to remove the s prefix from the names of the directories in which you install the shared files. The default is "y" for "yes"-remove the s prefix.
Convert slib->lib, sbin->bin, sspool->spool, sinclude->include [y]? [RETURN]
The fourth question is whether to install all the shared files, some, or none of them. The default is to install just some selected shared files.
Install Shared files (All, Some, None) [s]? [RETURN]
Now you're asked whether to install the manpages. The default is to install them all. You might choose not to install unformatted manpages if you are low on disk space or if you don't have nroff on your system to format them with:
Install Unformatted Man pages (Approx 13Kb) [y]? [RETURN] Install Formatted Man pages (Approx 15Kb) [y]? [RETURN]
Finally you're asked about any other shareable files.
Install Other Shareable files (Approx 3Kb) [y]? [RETURN]
If you want the answer to any question to be used for all subsequent packages without further prompting, enter the answer in uppercase. You can enter a pathname in uppercase, and the installation script will convert it to lowercase before using it. For example:
Install package at dir [/usr/local]?
After answering all the questions, the installation script sets up its installation information and asks you once more if it's correct. If you change your mind about the current configuration, press "n" to get another chance to change some of your installation parameters or to abort the installation of this package entirely. If the current configuration is acceptable, press RETURN a final time, and the package is installed.
Please wait.... About To Install: qterm at /work/tools with shareable files at /work/tools/share slib->lib, sbin->bin, sspool->spool, sinclude->include Are these correct [y]? [RETURN] Proceeding with install... 0 directories added, 6 files installed, 0 symbolic links created. Approximately 99Kb installed.
Once the qterm installation is completed, the installation script returns to the main menu if this is the only package you have selected.
After all programs are installed, you can quit the installation program. Upon quitting, the installation program suggests a newfor you.
You may want to change your path to include: /work/tools/bin /work/tools/share/bin Suggested new path: /work/tools/bin:/work/tools/share/bin:/bin:/usr/bin ...
A log file of the installation process is kept in /tmp/RTRinstall.log . A typical entry looks like this:
If you don't want to be bothered with being questioned about every package in the installation, and the default values are fine with you, you can bypass the questions and install everything at once. At the main menu, press "A" for "All" to install all packages:
bash bitmaps bsdtar bsplit calen cpmod cvtbase delete diff ediff emacs fgrep fileutils find gawk getopt glimpse grabchars ... Enter the name of a package to install or choose Search, Quit or All <package, S(earch), A(ll), Q(uit) [Search]? A [RETURN]
GNU Bash, version 1.14.6. Bash is the GNU Project's Bourne Again SHell, an interactive shell with Bourne shell syntax (/bin/sh); but also with interactive command line editing, job control on architectures that support it, Csh-like history features and brace expansion, and a slew of other stuff. The bash package is approximately 2.3Mb 601Kb - Required 383Kb - Shared: DVI Format Documentation 205Kb - Shared: Formatted Man pages 217Kb - Shared: Info files 9Kb - Shared: Other Documentation 741Kb - Shared: PostScript Format Documentation 165Kb - Shared: Unformatted Man pages 49Kb - Shared: examples/templates/extra info Install bash [y]? y
The default answer is "y", to install bash
. However, if you
respond instead with the string
Install bash [y]?
Another alternative is to call the installation script with the -D option to use the defaults. For example:
You'll still have to answer the question about your umask , and you'll have to answer "A" for "All" to the main menu, but then all packages will be installed without prompting.
Note that to run a default installation, you will need to have write permission to the default directory of /usr/local .