Configuration for an internal database driver consists of setting parameters for the internal driver and creating a database pool that uses that driver.
The internal database driver parameters can be typed directly in the configuration file as described below. This example describes the steps involved in configuring an internal driver to interface with the Postgres or Solid driver.
ns_section "ns/db/drivers"
ns_section "ns/db/drivers" ns_param postgres nspostgres.so ns_param solid nssolid.so
ns_section "ns/db/pools" ns_param mypool "This pool will use Solid"
ns_section "ns/db/pool/mypool" ns_param Driver solid ns_param Datasource "TCP/IP hostname 1313" ns_param Connection 1
ns_section "ns/server/Server1/db" ns_params Pools *
The SOLID database is a reasonably-priced database from Solid Information Technology that can be installed on many platforms. AOLserver provides an internal database driver for the SOLID database. Temporary evalation copies can be downloaded from their web site, http://www.solidtech.com. There are some special considerations with using the SOLID database that are addressed in this section.
This database driver is installed in the same way as other database drivers. Add nssolid.so as a database driver in the ns/db/drivers section of the configuration file. When you create a database pool for it, the correct format for the datasource is this:
TCP/IP hostname 1313
TCP/IP specifies the protocol with which the SOLID AOLServer driver will communicate with the SOLID database server. The hostname is the fully-qualified hostname on which the SOLID database server resides, and 1313 is the port on that server where it is listening.
If you are using the nssolid database driver on Solaris 2.5.1, you need to set the LD_PRELOAD environment variable as follows:
setenv LD_PRELOAD /usr/lib/libm.so.1
Note that the Solid database driver only works with nsdp under Irix.
Special thanks to Robert Locke for contributing the code for this module.