Roadmap (Where's All My Stuff?)I find it much easier to administer a product if I know where every component is located. With that in mind, let's explore the directory structure for a "standard" PostgreSQL installation. When you install PostgreSQL, whether from an RPM (Red Hat Package Manager) or from source, it will be configured to install into a particular set of directories. The exact location for any given set of PostgreSQL files is determined when the package is built from source code. When you build a copy of PostgreSQL from source code (more on that a little later), the --prefix= directory- name flag determines the installation directory. The default value for --prefix is /usr/local/pgsql . You can change this by supplying a different prefix directory when you run the configure program: $ ./configure --prefix=/home/bruce/pg731 If you want more control over the location of each component, you can add some more options to the configure command line. Table 19.1 shows the location of each component. The leftmost column shows the name of a configure option, the second column lists PostgreSQL components , and the last column shows the component type. If you want, for example, to place the PostgreSQL shared libraries in a particular directory, you would add --libdir= location to the configure command line. Table 19.1. PostgreSQL Executable, Library, and Header Locations
The directories marked as not used are described when you run configure --help ( configure is a commonly used generic configuration program), but are not used by PostgreSQL. Table 19.1 shows where PostgreSQL will install the content of a basic configuration. You also can configure PostgreSQL to install optional packages (such as PL/Perl or the Java JDBC interface). Tables 19.2 and 19.3, later in the chapter, show where PostgreSQL will install each of the optional packages. |