Cleanup and When There is No Configure Script - Administration
Three basic software installations are covered here -- using the Red Hat Package Manager, compiling software using the standard GNU compilation method, and compiling and installing the software by hand. (From the book Linux Administration, A Beginner's Guide, third edition by Steven Graham and Steve Shah, McGraw-Hill/Osborne, 0072225629, 2002).
Once the package is installed, you can do some cleanup to get rid of all the temporary files created during the installation. Since you have the original source code tarball, it is okay to simply get rid of the entire directory from which you compiled the source code. In the case of the hello program, you would get rid of /usr/local/src/hello-1.3. Begin by going one directory level above the directory you want to remove. In this case, that would be /usr/local/src.
[root@ford hello-1.3]# cd /usr/local/src
Now use the rm command to remove the actual directory, like so:
[root@ford src]# rm -rf hello-1.3
CAUTION The rm command, especially with the -rf parameter, is very dangerous. It recursively removes an entire directory without stopping to verify any of the files. When run by the root user, this has the potential to really cause problems on your system. Be very careful and make sure you are erasing what you mean to erase. There is no “undelete” command. I repeat, there is no “undelete” command.
When There Is No configure Script
Sometimes you will download a package and instantly cd into a directory and run ./configure. And you will probably be shocked when you see the message, “No such file or directory.” As stated earlier in the module, read the README and INSTALL files in the distribution. Typically, the authors of the software are courteous enough to provide at least these two files. I don’t know how many times I’ve tried compiling something without first looking at the docs and then come back hours later to find that I missed a step. The first step you take when installing software is to read the documentation. It will probably point out the fact that you need to run imake first, then run make. You get the idea: always read the documentation first, then proceed to compiling the software.
This chapter is from Linux Administration, A Beginner's Guide, third edition, by Graham and Shah. (McGraw-Hill/Osborne, 2002, ISBN: 0072225629). Check it out at your favorite bookstore today.