After you’ve downloaded and uncompressed your new software, you’ll have to configure and tweak it to conform to your system. In general, the changes you’ll make will be things like
Adjusting path names (e.g., to install it into /home/yourid/bin rather than into /usr/local/bin, where you likely cannot install software).
Specifying what kind of Unix system you’re working on.
Inserting your email address and similar data.
Choosing one of two or three system-specific settings. What to choose for each system is clearly marked in the files you’ll be using.
If you’re installing a program that will be compiled, your steps will closely resemble these. If you’re installing a script, the steps will likely differ somewhat, but go ahead and read through these steps because the principles of what to change are the same for scripts and programs.
Precisely what changes you’ll have to make (in programs or scripts) are almost always documented in the INSTALL (or README, if there isn’t an INSTALL) file that comes with the software—in the Makefile (in the case of programs) or in the actual .pl or .sh files that you’ll run (in the case of scripts). (See Code Listing 14.2.) So be sure to read these files! The steps in this section assume that you’re starting in the main directory of uncompressed and untarred files that you downloaded.
jdoe /home/jdoe/src/yencode-0.46 $ more README This is yencode, an encoder/decoder package for the Usenet "yEnc" format,licensed under the GNU General Public License. FEATURES ---- * Portable program for all Unix operating systems. * The encoder can output single part or multipart yencoded archives of any size. * Smart decoder can handle multiple files, including files specified out of order or with nonsense file names. * Easy to use Usenet posting software enables one-liner posting of individual files or groups of files, including creation of SFV/CRC checksum files if desired. * Optional scan mode: automatically locate and decode single or multipart yencoded archives in specified directories or recursively. * Fully compliant with all versions of the yEnc specification (currently v1, v2, v3). * Properly implements CRC values, including the pcrc32 on each part of multipart archives, and a crc32 for the last part of a multipart archive. * Full internationalization (multilingual) support provided by GNU gettext. For more information on yEnc, visit http://www.yenc.org/. The yencode homepage is located at http://www.yencode.org/. I do not have access to very many system types. If you have trouble compiling or installing this program, please email me (or send patches!) and I will try to add support for your operating system. This version has been tested on FreeBSD and Linux. Internationalization support is currently only supported for English, because I'm an ignorant American. Translations are welcomed. This program should be considered "alpha quality" software. It has not been extensively tested in real-world applications. Please email me with bug reports, comments, and suggestions. --- Mail suggestions and bug reports to <[email protected]>. jdoe /home/jdoe/src/yencode-0.46 $ ls configure configure* |
1. | more README
To begin, type more README at the shell prompt to see the README file one screen at a time. This file should give you installation instructions as well as information about what details you need to provide. Code Listing 14.2 shows part of yencode’s README file. | |
2. | ls configure Type ls configure to see if there’s a file named configure in the current directory.
| |
3. | ./configure --prefix=/home/jdoe
Usually you can just enter ./configure to run configure and let the configuration happen by itself (Code Listing 14.3), though you may have a little more to do. We opted to add ––prefix=/home/jdoe to set everything up to be installed into jdoe’s home directory. configure makes a special Makefile, just for you, which makes the next steps much easier. Run “./configure --help | more” to see what flags are available (it differs greatly between packages). Code Listing 14.3. The ./configure program goes on and on.
| |
4. | vi Makefile
Use the text editor of your choice to review the Makefile, reading the instructions in it and checking the accuracy of things like directory and path names, program names, and similar settings. If you don’t know what something is or does, ignore it for now. Even if configure automatically sets up the Makefile for you, you should still glance through it to make sure that it’s putting stuff into the correct directories and that it doesn’t expect any additional information from you. If you find errors in the Makefile, review the INSTALL or README files and rerun configure with the appropriate options to get the Makefile in order. Figure 14.2 shows the Makefile for yencode. All we did was verify the prefix (base directory). Figure 14.2. Fortunately, many programs require minimal changes. | |
5. |
Save the file and close out of the editor. There! You’ve configured your software installation! |
✓ Tips
Exactly what steps you’ll have to take will depend on the software. Scripts will come as plain text files and you might not have to do anything besides download them. Most of the time, however, you’ll have to tweak scripts as well as programs (although the scripts won’t need to be compiled).
A good rule of thumb is to make minimal changes to the Makefile. Doing more than is required often causes the program not to compile or gives you a bazillion error messages. If this happens, just go to your backup Makefile, make a new copy, and try again, making only the necessary modifications. Better to make too few changes than to take the time and effort to make too many.