DBIPROXY(1) User Contributed Perl Documentation DBIPROXY(1) NNNNAAAAMMMMEEEE dbiproxy - A proxy server for the DBD::Proxy driver SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS dbiproxy --port DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN This tool is just a front end for the DBI::ProxyServer package. All it does is picking options from the command line and calling _D_B_I_:_:_P_r_o_x_y_S_e_r_v_e_r_:_:_m_a_i_n_(_). See the _D_B_I_:_:_P_r_o_x_y_S_e_r_v_e_r_(_3_) manpage for details. Available options include: --------cccchhhhrrrrooooooootttt====ddddiiiirrrr (UNIX only) After doing a _b_i_n_d_(_), change root directory to the given directory by doing a _c_h_r_o_o_t_(_). This is usefull for security, but it restricts the environment a lot. For example, you need to load DBI drivers in the config file or you have to create hard links to Unix sockets, if your drivers are using them. For example, with MySQL, a config file might contain the following lines: my $rootdir = '/var/dbiproxy'; my $unixsockdir = '/tmp'; my $unixsockfile = 'mysql.sock'; foreach $dir ($rootdir, "$rootdir$unixsockdir") { mkdir 0755, $dir; } link("$unixsockdir/$unixsockfile", "$rootdir$unixsockdir/$unixsockfile"); require DBD::mysql; { 'chroot' => $rootdir, ... } If you don't know _c_h_r_o_o_t_(_), think of an FTP server where you can see a certain directory tree only after logging in. See also the --group and --user options. --------ccccoooonnnnffffiiiiggggffffiiiilllleeee====ffffiiiilllleeee Config files are assumed to return a single hash ref that overrides the arguments of the new method. However, command line arguments in turn take precedence over the config file. See the the section on _C_O_N_F_I_G_U_R_A_T_I_O_N _F_I_L_E section below for details on the config file. --------ddddeeeebbbbuuuugggg Turn debugging mode on. Mainly this asserts that 5/Aug/1999 perl 5.005, patch 03 1 DBIPROXY(1) User Contributed Perl Documentation DBIPROXY(1) logging messages of level "debug" are created. --------ffffaaaacccciiiilllliiiittttyyyy====mmmmooooddddeeee (UNIX only) Facility to use for the section on _S_y_s_:_:_S_y_s_l_o_g _(_3_). The default is ddddaaaaeeeemmmmoooonnnn. --------ggggrrrroooouuuupppp====ggggiiiidddd After doing a _b_i_n_d_(_), change the real and effective GID to the given. This is usefull, if you want your server to bind to a privileged port (<1024), but don't want the server to execute as root. See also the --user option. GID's can be passed as group names or numeric values. --------llllooooccccaaaallllaaaaddddddddrrrr====iiiipppp By default a daemon is listening to any IP number that a machine has. This attribute allows to restrict the server to the given IP number. --------llllooooccccaaaallllppppoooorrrrtttt====ppppoooorrrrtttt This attribute sets the port on which the daemon is listening. It must be given somehow, as there's no default. --------llllooooggggffffiiiilllleeee====ffffiiiilllleeee Be default logging messages will be written to the syslog (Unix) or to the event log (Windows NT). On other operating systems you need to specify a log file. The special value "STDERR" forces logging to stderr. See the _N_e_t_:_:_D_a_e_m_o_n_:_:_L_o_g_(_3_) manpage for details. --------mmmmooooddddeeee====mmmmooooddddeeeennnnaaaammmmeeee The server can run in three different modes, depending on the environment. If you are running Perl 5.005 and did compile it for threads, then the server will create a new thread for each connection. The thread will execute the server's _R_u_n_(_) method and then terminate. This mode is the default, you can force it with "--mode=threads". If threads are not available, but you have a working _f_o_r_k_(_), then the server will behave similar by creating a new process for each connection. This mode will be used automatically in the absence of threads or if you use the "--mode=fork" option. Finally there's a single-connection mode: If the server has accepted a connection, he will enter the _R_u_n_(_) method. No other connections are accepted until the _R_u_n_(_) method returns (if the client disconnects). This operation mode is usefull if you have neither 5/Aug/1999 perl 5.005, patch 03 2 DBIPROXY(1) User Contributed Perl Documentation DBIPROXY(1) threads nor _f_o_r_k_(_), for example on the Macintosh. For debugging purposes you can force this mode with "--mode=single". --------ppppiiiiddddffffiiiilllleeee====ffffiiiilllleeee (UNIX only) If this option is present, a PID file will be created at the given location. --------uuuusssseeeerrrr====uuuuiiiidddd After doing a _b_i_n_d_(_), change the real and effective UID to the given. This is usefull, if you want your server to bind to a privileged port (<1024), but don't want the server to execute as root. See also the --group and the --chroot options. UID's can be passed as group names or numeric values. --------vvvveeeerrrrssssiiiioooonnnn Supresses startup of the server; instead the version string will be printed and the program exits immediately. AAAAUUUUTTTTHHHHOOOORRRR Copyright (c) 1997 Jochen Wiedmann Am Eisteich 9 72555 Metzingen Germany Email: joe@ispsoft.de Phone: +49 7123 14881 The DBI::ProxyServer module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. In particular permission is granted to Tim Bunce for distributing this as a part of the DBI. SSSSEEEEEEEE AAAALLLLSSSSOOOO the _D_B_I_:_:_P_r_o_x_y_S_e_r_v_e_r_(_3_) manpage, the _D_B_D_:_:_P_r_o_x_y_(_3_) manpage, the _D_B_I_(_3_) manpage 5/Aug/1999 perl 5.005, patch 03 3 DBIPROXY(1) User Contributed Perl Documentation DBIPROXY(1) 5/Aug/1999 perl 5.005, patch 03 4