Listed below are the procedural steps we took in producing our
/usr/local
and /opt/ packages.
Getting Ready to Compile
- Obtain the original source code file (traceroute-1.4a5.tar.gz) from
Lawrence Berkeley National Laboratory. Download the file to the
/compiletmp/ directory.
- If you are not using the Borne shell, invoke the
Borne shell now with the command:
"/bin/sh"
- Move to the /compiletmp/ directory and unzip the file with the command:
"gunzip traceroute-1.4a5.tar.gz"
- After unzipping the file, untar the resulting tar file with the command:
"tar -xof traceroute-1.4a5.tar"
- After untarring the file, move to the /compiletmp/traceroute-1.4a5
directory and create the Makefile by issuing the command:
"CC='gcc' ./configure --prefix=/usr/local/traceroute-1.4a5"
The above command assumes that "gcc" is in your search path. If
"gcc" is not in your search path, you must completely specify the
path to "gcc" in the above command.
- After the Makefile is configured, compile
the program with a simple "make" instruction.
No command-line arguments are necessary providing that:
- "make" is in your search path.
- You are in the "/compiletmp/traceroute-1.4a5/" directory when you run
"make".
- The above compilation resulted in all of the binaries being placed in the
"/compiletmp/traceroute-1.4a5/" directory. In order to set them up in
a stand-alone directory tree, you must install them. We already specified in the
configure instruction that we would install to the
/usr/local/traceroute-1.4a5/ directory. However, we must first create
the /usr/local/traceroute-1.4a5/ directory structure manually. Do so now with
the commands:
"mkdir /usr/local/traceroute-1.4a5"
"mkdir /usr/local/traceroute-1.4a5/man"
- Now, install the binaries, libraries, and man pages with the command:
"make install"
Creating the "SOURCE.tar.gz" File
- Since we did not have to make any changes to the original source code files in order to
compile them, we can distribute the source code files in their exact same state that we
received them. Since you still have the file, "traceroute-1.4a5.tar", in your
"/compiletmp/" directory, you can create and store the final
"SOURCE.tar.gz" File with the following sequence of commands:
"mv /compiletmp/traceroute-1.4a5.tar /compiletmp/traceroute-1.4a5-SOURCE.tar"
"gzip -9 /compiletmp/traceroute-1.4a5-SOURCE.tar"
"mv /compiletmp/traceroute-1.4a5-SOURCE.tar.gz /storage-path"
The above commands simply change the name of the source code file to fit our file
naming convention, zips the file back up, and places it in storage. Of course, you will
supply the actual storage path (rather than simply typing in /storage-path/).
Creating the "COMPILED.tar.gz" File (to run in /usr/local/)
- Go to the /usr/local/ directory and tar up the
compiled binaries and libraries with the command:
"tar -cf traceroute-1.4a5-COMPILED.tar traceroute-1.4a5"
- Zip the resulting tar file up with the command:
"gzip -9 traceroute-1.4a5-COMPILED.tar"
- Move the final COMPILED.tar.gz file to the appropriate storage area
with the command:
"mv /usr/local/traceroute-1.4a5-COMPILED.tar.gz /storage-path/"
Of course, you will supply the actual storage path (rather than
simply typing in /storage-path/).
- Delete the entire make directory structure in /compiletmp/
by going to the /compiletmp/ directory and entering the command:
"rm -R /compiletmp/traceroute-1.4a5"
Preparing to Create the "USRPKG" and "OPTPKG" Packages
- In order to be certain that your COMPILED.tar.gz file is not corrupted, we shall
begin by completely deleting the currently installed binaries from /usr/local.
Do so with the command:
"rm -R /usr/local/traceroute-1.4a5"
- Copy the COMPILED.tar.gz from its storage area to /usr/local/
with the command:
"cp /storage-path/traceroute-1.4a5-COMPILED.tar.gz /usr/local"
- Move to the /usr/local directory and unzip the COMPILED.tar.gz
file with the command:
"gunzip traceroute-1.4a5-COMPILED.tar.gz"
- Now, untar the COMPILED.tar file with the command:
"tar -xof traceroute-1.4a5-COMPILED.tar"
- Delete the COMPILED.tar file with the command:
"rm traceroute-1.4a5-COMPILED.tar"
- At this point the program should work. Be sure to test it before proceeding to
the package-creation steps.
Creating the "USRPKG.tar" and "OPTPKG.tar" File
Once the program has been installed and tested in /usr/local/, the final steps
for creating the distribution packages are identical for all programs.
Click Here for details regarding the steps we take to produce the final
"USRPKG.tar.gz" and "OPTPKG.tar.gz" files.