1DBIPROXY(1)           User Contributed Perl Documentation          DBIPROXY(1)
2
3
4

NAME

6       dbiproxy - A proxy server for the DBD::Proxy driver
7

SYNOPSIS

9           dbiproxy <options> --localport=<port>
10

DESCRIPTION

12       This tool is just a front end for the DBI::ProxyServer package. All it
13       does is picking options from the command line and calling
14       DBI::ProxyServer::main(). See DBI::ProxyServer for details.
15
16       Available options include:
17
18       --chroot=dir
19           (UNIX only)  After doing a bind(), change root directory to the
20           given directory by doing a chroot(). This is useful for security,
21           but it restricts the environment a lot. For example, you need to
22           load DBI drivers in the config file or you have to create hard
23           links to Unix sockets, if your drivers are using them. For example,
24           with MySQL, a config file might contain the following lines:
25
26               my $rootdir = '/var/dbiproxy';
27               my $unixsockdir = '/tmp';
28               my $unixsockfile = 'mysql.sock';
29               foreach $dir ($rootdir, "$rootdir$unixsockdir") {
30                   mkdir 0755, $dir;
31               }
32               link("$unixsockdir/$unixsockfile",
33                    "$rootdir$unixsockdir/$unixsockfile");
34               require DBD::mysql;
35
36               {
37                   'chroot' => $rootdir,
38                   ...
39               }
40
41           If you don't know chroot(), think of an FTP server where you can
42           see a certain directory tree only after logging in. See also the
43           --group and --user options.
44
45       --configfile=file
46           Config files are assumed to return a single hash ref that overrides
47           the arguments of the new method. However, command line arguments in
48           turn take precedence over the config file. See the "CONFIGURATION
49           FILE" section in the DBI::ProxyServer documentation for details on
50           the config file.
51
52       --debug
53           Turn debugging mode on. Mainly this asserts that logging messages
54           of level "debug" are created.
55
56       --facility=mode
57           (UNIX only) Facility to use for Sys::Syslog. The default is daemon.
58
59       --group=gid
60           After doing a bind(), change the real and effective GID to the
61           given.  This is useful, if you want your server to bind to a
62           privileged port (<1024), but don't want the server to execute as
63           root. See also the --user option.
64
65           GID's can be passed as group names or numeric values.
66
67       --localaddr=ip
68           By default a daemon is listening to any IP number that a machine
69           has. This attribute allows to restrict the server to the given IP
70           number.
71
72       --localport=port
73           This attribute sets the port on which the daemon is listening. It
74           must be given somehow, as there's no default.
75
76       --logfile=file
77           Be default logging messages will be written to the syslog (Unix) or
78           to the event log (Windows NT). On other operating systems you need
79           to specify a log file. The special value "STDERR" forces logging to
80           stderr. See Net::Daemon::Log for details.
81
82       --mode=modename
83           The server can run in three different modes, depending on the
84           environment.
85
86           If you are running Perl 5.005 and did compile it for threads, then
87           the server will create a new thread for each connection. The thread
88           will execute the server's Run() method and then terminate. This
89           mode is the default, you can force it with "--mode=threads".
90
91           If threads are not available, but you have a working fork(), then
92           the server will behave similar by creating a new process for each
93           connection.  This mode will be used automatically in the absence of
94           threads or if you use the "--mode=fork" option.
95
96           Finally there's a single-connection mode: If the server has
97           accepted a connection, he will enter the Run() method. No other
98           connections are accepted until the Run() method returns (if the
99           client disconnects).  This operation mode is useful if you have
100           neither threads nor fork(), for example on the Macintosh. For
101           debugging purposes you can force this mode with "--mode=single".
102
103       --pidfile=file
104           (UNIX only) If this option is present, a PID file will be created
105           at the given location. Default is to not create a pidfile.
106
107       --user=uid
108           After doing a bind(), change the real and effective UID to the
109           given.  This is useful, if you want your server to bind to a
110           privileged port (<1024), but don't want the server to execute as
111           root. See also the --group and the --chroot options.
112
113           UID's can be passed as group names or numeric values.
114
115       --version
116           Supresses startup of the server; instead the version string will be
117           printed and the program exits immediately.
118

AUTHOR

120           Copyright (c) 1997    Jochen Wiedmann
121                                 Am Eisteich 9
122                                 72555 Metzingen
123                                 Germany
124
125                                 Email: joe@ispsoft.de
126                                 Phone: +49 7123 14881
127
128       The DBI::ProxyServer module is free software; you can redistribute it
129       and/or modify it under the same terms as Perl itself. In particular
130       permission is granted to Tim Bunce for distributing this as a part of
131       the DBI.
132

SEE ALSO

134       DBI::ProxyServer, DBD::Proxy, DBI
135
136
137
138perl v5.12.1                      2010-08-02                       DBIPROXY(1)
Impressum