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).
The GNU hello program might not seem like a very useful tool, for the most part I will agree it is not. But one valuable thing it provides is the ability to test the compiler on your system. If you’ve just finished the task of upgrading your compiler, compiling this simple program will provide a sanity check that indeed the compiler is working.
One problem you might run into is when the program can’t find a file of the type “libsomthing.so” and the program terminates because it can’t find the file. This file is what is called a library. This is synonymous with DLLs in Windows. These libraries are stored in several locations on the Linux system and typically reside in /usr/lib/ and /usr/local/lib/. If you have installed a software package in a different location than /usr/local you will have to configure your system or shell to know where to look for those new libraries.
NOTELinux libraries can be located anywhere in your file system. Typically Windows only allows you to store libraries in one location. You’ll see that with the use of NFS you can share a directory (in our case, software from one server) and allow any client using that share to use the software residing on the share. With Windows, you’re stuck installing the software on each and every machine.
There are two methods for configuring libraries on a Linux system. One is to modify /etc/ld.conf, add the path of your new libraries, and use the ldconfig –m command to load in the new directories. You can also use the LD_LIBRARY_PATH environment variable to hold a list of library directories to look for library files. Read the man page for ld.conf for more information.
Progress Check
1. What is the README file used for? (The README file holds information on how to compile/install and use the software.) 2. What three steps are used to compile a typical GNU software package? (First configure, then make, and then make install.)
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.