Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Databases - Practical PostgreSQL
Previous Page Home Next Page

Step 3: Configuring the Source Tree

Before compilation, you must configure the source, and specify installation options specific to your needs. This is done with the configure script.

The configure script is also used to check for software dependencies that are required to compile PostgreSQL. As configure checks for dependencies, it will create the necessary files for use with the gmake command.

To use the default installation script, issue the following command: ./configure . To specify options that will enable certain non-default features, append the option to the ./configure command. For a list of all the available configuration options, use ./configure --help

There is a good chance that the default source configuration that configure uses will not be the setup you require. For a well-rounded PostgreSQL installation, we recommend you use at least the following options:

--with-CXX

Allows you to build C++ programs for use with PostgreSQL by building the libpq++ library.

--enable-odbc

Allows you to connect to PostgreSQL with programs that have a compatible ODBC driver (such as Microsoft Access).

--enable-multibyte

Allows multibyte characters to be used, such as non-English language characters (e.g., Kanji).

--with-maxbackends= NUMBER

Sets NUMBER as the maximum number of allowed connections (32, by default).

You can also specify anything from the following complete list of configuration options:

--prefix= PREFIX

Specifies that files should be installed under the directory provided with PREFIX , instead of the default installation directory ( /usr/local/pgsql ).

--exec-prefix= EXEC-PREFIX

Specifies that architecture-dependent executable files should be installed under the directory supplied with EXEC-PREFIX .

--bindir= DIRECTORY

Specifies that user executable files (such as psql ) should be installed into the directory supplied with DIRECTORY .

--datadir= DIRECTORY

Specifies that the database should install data files used by PostgreSQL's program suite (as well as sample configuration files) into the directory supplied with DIRECTORY . Note that the directory here is not used as an alternate database data directory; it is merely the directory where read-only files used by the program suite are installed.

--sysconfdir= DIRECTORY

Specifies that system configuration files should be installed into the directory supplied with DIRECTORY . By default, these are put into the etc folder within the specified base installation directory.

--libdir= DIRECTORY

Specifies that library files should be stored in the directory supplied with DIRECTORY . If you are running Linux, this directory should also be entered into the ld.so.conf file.

--includedir= DIRECTORY

Specifies that C and C++ header files should be installed into the directory supplied with DIRECTORY . By default, include files are stored in the include folder within the base installation directory.

--docdir= DIRECTORY

Specifies that documentation files should be installed into the directory supplied with DIRECTORY . This does not include PostgreSQL's man files.

--mandir= DIRECTORY

Specifies that man files should be installed into the directory supplied with DIRECTORY .

--with-includes= DIRECTORIES

Specifies that the colon-separated list of directories supplied with DIRECTORIES should be searched with the purpose of locating additional header files.

--with-libraries= DIRECTORIES

Specifies that the colon-separated list of directories supplied with DIRECTORIES should be searched with the purpose of locating additional libraries.

--enable-locale

Enables locale support. The use of locale support will incur a performance penalty and should only be enabled if you are are not in an English-speaking location.

--enable-recode

Enables the use of the recode translation library.

--enable-multibyte

Enables multibyte encoding. Enabling this option allows the support of non-ASCII characters; this is most useful with languages such as Japanese, Korean, and Chinese, which all use nonstandard character encoding.

--with-pgport= NUMBER

Specifies that the the port number supplied with NUMBER should be used as the default port by PostgreSQL. This can be changed when starting the postmaster application.

--with-maxbackends= NUMBER

Sets NUMBER as the maximum number of allowed connections (32, by default).

--with-CXX

Specifies that the C++ interface library should be compiled during installation. You will need this library if you plan to develop C++ applications for use with PostgreSQL.

--with-perl

Specifies that the PostgreSQL Perl interface module should be compiled during installation. This module will need to be installed in a directory that is usually owned by root , so you will most likely need to be logged in as the root user to complete installation with this option chosen. This configuration option is only required if you plan to use the pl/Perl procedural language.

--with-python

Specifies that the PostgreSQL Python interface module should be compiled during installation. As with the --with-perl option, you will most likely need to log in as the root user to complete installation with this option. This option is only required if you plan to use the pl/Python procedural language.

--with-tcl

Specifies that Tcl support should be included in the installation. This option will install PostgreSQL applications and extensions that require Tcl, such as pgaccess (a popular graphical database client) and the pl/Tcl procedural language.

--without-tk

Specifies that Tcl support should be compiled without additional support for Tk, the graphical application tool kit. Using this option with the --with-tcl option specifies that PostgreSQL Tcl applications that require Tk (such as pgtksh and pgaccess ) should not be installed.

--with-tclconfig= DIRECTORY , --with-tkconfig= DIRECTORY

Specifies that the Tcl or Tk (depending on the option) configuration file (either tclConfig.sh or tkConfig.sh ) is located in the directory supplied with DIRECTORY , instead of the default directory. These two files are installed by Tcl/Tk, and the information within them is required by PostgreSQL's Tcl/Tk interface modules.

--enable-odbc

Enables support for ODBC.

--with-odbcinst= DIRECTORY

Specifies that the ODBC driver should look in the directory supplied with DIRECTORY for its odbcinst.ini file. By default, this file is held in the etc directory, which is located in the installation directory.

--with-krb4= DIRECTORY , --with-krb5= DIRECTORY

Enables support for the Kerberos authentication system. The use of Kerberos is not covered in this book.

--with-krb-srvnam= NAME

Specifies the name of the Kerberos service principal. By default, postgres is set as the service principal name.

--with-openssl= DIRECTORY

Enables the use of SSL to support encrypted database connections. To build support for SSL, OpenSSL must be configured correctly and installed in the directory supplied with DIRECTORY . This option is required if you plan on using the stunnel tool.

--with-java

Enables Java/JDBC support. The Ant and JDK packages are required for PostgreSQL to compile correctly with this feature enabled.

--enable-syslog

Enables the use of the syslog daemon for logging. You will need to specify that you wish to use syslog for logging at runtime if you wish to use it.

--enable-debug

Enables the compilation of all PostgreSQL libraries and applications with debugging symbols. This will slow down performance and increase binary file size, but the debugging symbols are useful for developers to help diagnose bugs and problems that can be encountered with PostgreSQL.

--enable-cassert

Enables assertion checking. This feature slows down performance and should be used only during development of PostgreSQL database itself.

If you compile PostgreSQL and find that you are missing a feature, you can return to this step, reconfigure, and continue with the subsequent steps to build and install PostgreSQL. If you choose to come back to this step and reconfigure the PostgreSQL source before installing, be sure to use the gmake clean command from the top-level directory of the source tree (usually, /usr/local/src/postgresql-[version]  ). This will remove any leftover object files and partially compiled files.

Databases - Practical PostgreSQL
Previous Page Home Next Page

 
 
  Published under the terms of the Open Publication License Design by Interspire