1 ################################################################
3 ################################################################
5 Bweb works well with 1.39 release.
9 3) intialise your configuration file
10 4) do some sql stuff (for postgresql user)
11 5) get a bconsole that work with Expect
12 6) get bacula log more useful
14 8) using sudo with autochanger
16 ################ FILE COPY #####################################
17 # you must get bweb cvs files
18 cvs -d:pserver:anonymous@bacula.cvs.sourceforge.net:/cvsroot/bacula login
19 cvs -z3 -d:pserver:anonymous@bacula.cvs.sourceforge.net:/cvsroot/bacula co -P gui
22 # first, copy bweb perl librarie in your PERL5 INC path
23 install -m 644 -o root -g root bweb/lib/*.pm /usr/share/perl5
25 # copy bweb perl program to you cgi location
26 mkdir -m 755 /usr/lib/cgi-bin/bweb
27 install -m 755 -o root -g root bweb/cgi/*.pl /usr/lib/cgi-bin/bweb
30 mkdir -m 750 /etc/bweb
31 chown root:www-data /etc/bweb
32 echo '$VAR1 = { template_dir => "/usr/share/bweb/tpl" };' > /etc/bweb/config
33 chown www-data /etc/bweb/config
35 # copy bweb template file
36 mkdir -p /usr/share/bweb/tpl
37 install -m 644 -o root -g root bweb/tpl/*.tpl /usr/share/bweb/tpl
39 # copy bweb graphics elements (bweb elements must reside on /bweb)
41 install -m 644 -o root -g root bweb/html/*.{js,png,css,gif,ico} /var/www/bweb
45 WARNING : Your www-data user must be able to execute bconsole and able to read bconsole.conf !
46 You can create an bconsole group for that.
48 ################ USE FRENCH VERSION ############################
50 Simply use lang/fr/tpl/*.tpl files instead of tpl/*.tpl
52 ################ INSTALL PERL LIBRARY ##########################
55 - DBI (with mysql or postgresql support DBD::Pg and DBD::mysql)
62 You can install perl modules with CPAN
66 Or use your distribution
67 apt-get install libgd-graph-perl libhtml-template-perl libexpect-perl
68 apt-get install libdbd-mysql-perl libdbd-pg-perl libdbi-perl libtime-modules-perl
70 ################ APACHE CONFIGURATION ##########################
72 It could be a good idea to protect your bweb installation.
74 Put this in you httpd.conf, and add user with htpasswd
76 <Directory /usr/lib/cgi-bin/bweb>
77 Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
79 AuthName MyPrivateFile
80 AuthUserFile /etc/apache/htpasswd
86 ################ CONFIGURATION #################################
88 /etc/bweb/config looks like : (you can edit it inside bweb)
90 'graph_font' => '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf',
92 'config_file' => '/etc/bweb/config',
93 'bconsole' => '/usr/sbin/bconsole -n -c /etc/bacula/bconsole.conf',
103 'device' => '/dev/changer',
109 'mtxcmd' => '/usr/sbin/mtx',
115 }, 'Bweb::Autochanger' )
118 'template_dir' => '/usr/share/bweb/tpl',
119 'dbi' => 'DBI:mysql:database=bacula',
123 'email_media' => 'eric@localhost'
127 ################ BRESTORE ######################################
129 If you want to use brestore with bweb, you must associate mime type
130 text/brestore with your brestore.pl.
132 ################ POSTGRESQL NOTES ##############################
134 If you think that Mysql is not a great database (or just a toy), you must add
135 function to the Postgresql bacula database to get Bweb works.
137 psql -u bacula bacula < script/bweb-postgresql.sql
139 ################ BCONSOLE NOTES ################################
141 You must use bconsole without conio/readline support. For that, use
144 ################ BACULA LOG ####################################
146 To use Bweb log engine you MUST use catalog message type.
151 operator = root@localhost = mount
152 console = all, !skipped, !saved
153 append = "/tmp/bacula/var/bacula/working/log" = all, !skipped
155 catalog = all, !skipped, !saved
159 ################ BWEB LIMITATION ###############################
161 To get bweb working, you must follow these rules
162 - Media, Storage and Pool must have [A-Za-z_0-9\.-]+ (no space)
163 - AutoChanger name must be same as Device and Location name in bacula
165 ################ SUDO CONFIGURATION ############################
167 If you use sudo, put this on you /etc/sudoers
169 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer transfer *
170 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer status
171 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer load *
172 www-data ALL = (root) NOPASSWD: /usr/sbin/mtx -f /dev/changer unload *