Bweb works well with 2.0 release or later.
1) install Perl lib
-2) copy your files
-3) initialize your configuration file
-4) do some sql stuff (for postgresql or mysql 5 users)
-5) use the -n option on bconsole so that it works with Expect
-6) get bacula log more useful
-7) bweb limitation
-8) using sudo with autochanger
-9) using bfileview.pl
-10) accessing to bweb
-11) setting mysql read-only account
-12) get more statistics
-13) use users and groups with bweb
-14) setup restoration in bweb
-
-################ FILE COPY #####################################
+2) using lighttpd
+3) copy your files (using apache)
+4) initialize your configuration file
+5) do some sql stuff (for postgresql or mysql 5 users)
+6) use the -n option on bconsole so that it works with Expect
+7) get bacula log more useful
+8) bweb limitation
+9) using sudo with autochanger
+10) using bfileview.pl
+11) accessing to bweb
+12) setting mysql read-only account
+13) get more statistics
+14) use users and groups with bweb
+15) setup restoration in bweb
+
+
+################ INSTALL PERL LIBRARY ##########################
+
+ - perl modules
+ - DBI (with mysql or postgresql support DBD::Pg and DBD::mysql)
+ (SQLite is not supported)
+ - GD::Graph
+ - GD
+ - HTML::Template
+ - CGI
+ - Expect
+ - Time::ParseDate
+ - Date::Calc
+
+ You can install perl modules with CPAN
+ perl -e shell -MCPAN
+ > install Expect
+
+ Or use your distribution
+ apt-get install libgd-graph-perl libhtml-template-perl libexpect-perl \
+ libdbd-mysql-perl libdbd-pg-perl libdbi-perl \
+ libdate-calc-perl libtime-modules-perl
+
+ Note: the best way to test if you have all the dependencies
+ fullfilled for Perl is to:
+
+ cd /var/www/cgi-bin/bweb
+ ./bweb.pl
+
+ you might also want to try:
+
+ ./bgraph.pl
+
+ To make sure the graphing modules are loaded. However, running it
+ will spray binary graphics data on your terminal. Otherwise, you will
+ get an error.
+
+ That should show you if any of the pre-requisites are missing.
+ On SuSE 10.2, I was able to load all the appropriate modules via rpms,
+ with the exception of Expect and Time::ParseDate, which I loaded manually
+ using perl.
+
+ If you experience problems, always consult the Apache error_log
+ file.
+
+
+################# USE LIGHTTPD WITH BWEB #######################
+
+In this example, bweb files are in /home/bacula/bweb
+
+bacula:~$ cd bweb
+bacula:~/bweb$ sed -i "s:/etc/bacula/bweb.conf:$PWD/bweb.conf:" lib/Bweb.pm
+bacula:~/bweb$ cat > bweb.conf <<EOF
+$VAR1 = { template_dir => '$PWD/lang',
+ fv_write_path => '/tmp/',
+ };
+EOF
+
+
+# You can start the web server from the bweb directory
+bacula@localhost:~/bweb$ ./script/starthttp
+ Using bweb on /home/eric/dev/git/gui/bweb, use firefox http://localhost:9180
+ 2009-07-18 22:23:12: (log.c.75) server started
+
+
+By default, only the loopback interface is binded, you can change that
+in the bweb/script/httpd.conf file.
+
+
+################ FILE COPY (Full Apache methode) ###############
# you must get bweb svn files
svn checkout https://bacula.svn.sourceforge.net/svnroot/bacula/trunk/gui/bweb bweb
# or
install -m 644 -o root -g root bweb/lib/*.pm /usr/share/perl5
+
+
# copy the bweb perl program to your cgi location
mkdir -m 755 /usr/lib/cgi-bin/bweb
install -m 755 -o root -g root bweb/cgi/*.pl /usr/lib/cgi-bin/bweb
Simply copy lang/fr/tpl/*.tpl files to .../tpl/fr/*.tpl and choose
your language in the configuration panel.
-################ INSTALL PERL LIBRARY ##########################
-
- - perl modules
- - DBI (with mysql or postgresql support DBD::Pg and DBD::mysql)
- (SQLite is not supported)
- - GD::Graph
- - GD
- - HTML::Template
- - CGI
- - Expect
- - Time::ParseDate
- - Date::Calc
-
- You can install perl modules with CPAN
- perl -e shell -MCPAN
- > install Expect
-
- Or use your distribution
- apt-get install libgd-graph-perl libhtml-template-perl libexpect-perl \
- libdbd-mysql-perl libdbd-pg-perl libdbi-perl \
- libdate-calc-perl libtime-modules-perl
-
- Note: the best way to test if you have all the dependencies
- fullfilled for Perl is to:
-
- cd /var/www/cgi-bin/bweb
- ./bweb.pl
-
- you might also want to try:
-
- ./bgraph.pl
-
- To make sure the graphing modules are loaded. However, running it
- will spray binary graphics data on your terminal. Otherwise, you will
- get an error.
-
- That should show you if any of the pre-requisites are missing.
- On SuSE 10.2, I was able to load all the appropriate modules via rpms,
- with the exception of Expect and Time::ParseDate, which I loaded manually
- using perl.
-
- If you experience problems, always consult the Apache error_log
- file.
################ APACHE CONFIGURATION ##########################
--- /dev/null
+################################################################
+# lighttpd configuration example for bweb
+# bacula@localhost:~$ lighttpd -f script/httpd.conf
+# firefox http://localhost:9180
+################################################################
+
+server.bind = "localhost"
+server.port = 9180
+
+################################################################
+
+var.basedir = env.BWEBBASE
+
+server.modules = ("mod_cgi", "mod_alias", "mod_setenv")
+server.document-root = basedir + "/html/"
+
+cgi.assign = ( ".pl" => "/usr/bin/perl" )
+alias.url = ( "/cgi-bin/bweb/" => basedir + "/cgi/",
+ "/bweb/fv/" => "/tmp/",
+ "/bweb" => basedir + "/html/",
+ )
+
+setenv.add-environment = (
+ "PERLLIB" => basedir + "/lib/"
+)
+
+index-file.names = ( "index.html" )
+
+mimetype.assign = (
+".html" => "text/html",
+".gif" => "image/gif",
+".jpeg" => "image/jpeg",
+".jpg" => "image/jpeg",
+".png" => "image/png",
+".ico" => "image/x-icon",
+".css" => "text/css",
+".js" => "application/javascript",
+)