Appendix A. Software SourcesThis appendix begins with a brief discussion of retrieving and installing software tools. It then provides a list of potential sources for the software. First I describe several excellent general sources for tools, then I list specific sources.Much of this software requires root privileges and could contain dangerous code. Be sure you get your code from reliable sources. Considerable effort has been made to provide canonical sources, but no guarantee can be made for the trustworthiness of the code or the sources listed here. Most of these programs are available as FreeBSD ports or Linux packages. I have used them, when available, for testing for this book.
A.1. Installing SoftwareI have not tried to describe how to install individual tools in this book. First, in my experience, a set of directions that is accurate for one version of the software may not be accurate for the next version. Even more likely, directions for one operating system may fail miserably for another. This is frequently true even for different versions of the same operating system. Consequently, trying to develop a reasonable set of directions for each tool for a variety of operating systems was considered unfeasible. In general, the best source of information, i.e., the only information that is likely to be reliable, is the information that comes with the software itself. Read the directions!Having said this, I have tried to give some generic directions for installing software. At best, these are meant to augment the existing directions. They may help clarify matters when the included directions are a little too brief. These instructions are not meant as replacements. Installing software has gotten much easier in the last few years, thanks in part to several developments. First, GNU configure and build tools have had a tremendous impact in erasing the differences created by different operating systems. Second, there have been improvements in file transfer and compression tools as well as increased standardization of the tools used. Finally, several operating systems now include mechanisms to automate the process. If you can use these, your life will be much simpler. I have briefly described three here -- the Solaris package system, the Red Hat package manager, and the FreeBSD port system. Please consult the appropriate documentation for the details for each. A.1.1. Generic InstallsHere is a quick review of basic steps you will go through in installing a program. Not every step will be needed in every case. If you have specific directions for a product, use those directions, not these! (Although slightly dated, a very comprehensive discussion can be found in Porting Unix Software by Greg Lehey.)
A.1.2. Solaris PackagesIn Solaris, packages are directories of the files needed to build or run a program. This is the mechanism Sun Microsystems uses to distribute software. If you are installing from a CD-ROM, the files will typically be laid out just the way you need them. You will only need to mount the CD-ROM so you can get to them. If you are downloading packages, you will typically need to unpack them first, usually with the tar command. You may want to do this under the default directory /var/spool/pkg, but you can override this location with command options when installing the package.Once you have the appropriate package on your system, you can use one of several closely related commands to manage it. To install a package, use the pkgadd command. Without any arguments, pkgadd will list the packages on your system and give you the opportunity to select the package of interest. Alternately, you can name the package you want to install. You can use the -d option to specify a different directory. Other commands include the pkgrm command to remove a package, the pkginfo command to display information on which packages are already installed on your system, and pkgchk to check the integrity of the package. For other software in package format, you might begin by looking at http://sunfreeware.com or searching the Web for Sun's university alliance software repositories. Use the string "sunsite" in your search.
A.1.3. Red Hat Package ManagerDifferent versions of Linux have taken the idea of packages and expanded on it. Several different package formats are available, but the Red Hat format is probably the most common. There are several programs for the installation of software in the RPM format. Of these, the Red Hat Package Manager (rpm) is what I generally use. Two other package management tools that provide GUIs include glint and gnorpm.First, download the package in question. Then, to install a package, call rpm with the options -ivh and the name of the package. If all goes well, that is all there is to it. You can use the -e option to remove a package. A variety of packages come with many Linux distributions. Numerous sites on the Web offer extensive collections of Linux software in RPM format. If you are using Red Hat Linux, try http://www.redhat.com. Many of the repositories will provide you with a list of dependencies, which you'll need to install first.
A.1.4. FreeBSD PortsAnother approach to automating software installation is the port collection approach used by FreeBSD. This, by far, is the easiest approach to use and has been adapted to other systems including OpenBSD and Debian Linux. The FreeBSD port collection is basically a set of directions for installing software. Literally thousands of programs are available.Software is grouped by category in subdirectories in the /usr/ports directory. You change to the appropriate directory for the program of interest and type make install. At that point, you sit back and watch the magic. The port system will attempt to locate the appropriate file in the /usr/ports/distfiles directory. If the file is not there, it will then try downloading the file from an appropriate site via FTP. Usually the port system knows about several sites so, if it can't reach one, it will try another. Once it has the file, it will calculate and verify a checksum for the file. It next applies appropriate patches and checks dependencies. It will automatically install other ports as needed. Once everything is in place, it will compile the software. Finally, it installs the software and documentation. When it works, which is almost always, it is simply extraordinary. The port collection is an installation option with FreeBSD. Alternately, you can visit http://www.freebsd.org. The process is described in the FreeBSD Handbook. When evaluating a new piece of software, I have the luxury of testing the software on several different platforms. In general, I find the FreeBSD port system the easiest approach to use. If I have trouble with a FreeBSD port, I'll look for a Linux package next. If that fails, I generally go to a generic source install. In my experience, Solaris packages tend to be hard to find.
Copyright © 2002 O'Reilly & Associates. All rights reserved. |
|