odbcbridge - Bridge proxy server daemon for UnixODBC.pm.
odbcbridge
Odbcbridge is a proxy server for ODBC clients that use the UnixODBC::BridgeServer API. In normal use, odbcbridge is started when the system boots, and requires no user intervention.
Odbcbridge uses two configuration files, odbcbridge.conf and odbclogins, for run-time configuration. The configuration files are described below.
Odbcbridge can be started manually from the shell prompt, or as installed by the UnixODBC installation from the startup script unixodbc:
$ /usr/local/etc/init.d/unixodbc start
To terminate the operation of the daemon, use:
$ /usr/local/etc/init.d/unixodbc stop
The unixodbc script is meant to start the daemon when the system boots and terminate the daemon at system shut down. To enable automatic starting and stopping of the daemon, consult your system's documentation.
Print help message and exit.
Odbcbridge.conf is normally installed in /usr/local/etc and contains configuration directives for odbcbridge, as well as host-based access. Because UnixODBC::BridgeServers are a subclass of RPC::PlServer, odbcbridge inherits all of its configuration facilities. Consult the RPC::PlServer man page for details about configuration.
Here is the odbcbridge.conf file that is installed during the odbcbridge installation:
# # odbcbridge.conf - configuration options for UnixODBC.pm bridge # server. # { 'localaddr' => undef, 'localport' => 9999, 'facility' => 'daemon', 'user' => 'nobody', 'group' => undef, 'mode' => 'fork', # Increase this value if you receive socket reset errors 'timeout' => 60, # Use syslog facility's daemon log. 'logfile' => undef, 'pidfile' => '/usr/local/var/odbcbridge/odbcbridge.pid', 'debug' => 2, # Accept connections from anyone. 'clients' => [{ 'mask' => '.*', 'accept' => 1}] }
The odbclogins file contains host login information, in the form:
host::user::password
The odbclogins file should have permissions 0600, to prevent outside users from viewing the information. If using odbcbridge with CGI scripts, then the odbclogins ownership should be those named in the Web server httpd.conf file's User and Group directives.
The odbclogins file that is installed with odbcbridge is shown here.
# odbclogins - each line has the format server::user::password # IMPORTANT - make sure you chmod 0600 odbclogins, and, if using # UnixODBC with CGI applications, change ownership to the user and # group of the httpd server - usually user nobody, group nobody, # although some installations use apache or www-data, or the values # of the User and Group directives in httpd.conf, if they are # something different. # host1::user::password # host2::user::password # host3::user::password
Revision: $Revision: 1.4 $
Written by: Robert Allan Kiesling, rkies@cpan.org.
Licensed under the same terms as Perl. Please refer to the file "Artistic" for details.
perl(1), UnixODBC(3), UnixODBC::BridgeServer(3), RPC::PlServer(3)
To install UnixODBC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm UnixODBC
CPAN shell
perl -MCPAN -e shell install UnixODBC
For more information on module installation, please visit the detailed CPAN module installation guide.