On this page
Ubuntu Server 9.04 Bacula Bweb GUI
Bweb is a perl based web program that provides a tool to do basic operations and get statistics. It obtains its information from your catalog database and the bconsole program.
In this tutorial we assume that you already have a working bacula server, apache and mysql.
cd /root
apt-get install -y libgdchart-gd2-xpm* make php-pear preload
apt-get install -y libgd-graph-perl libhtml-template-perl libexpect-perl
apt-get install -y libdbd-mysql-perl libdbd-pg-perl libdbi-perl libtime-modules-perl
pear install db
wget http://sourceforge.net/projects/bacula/files/z-older-releases/bacula/2.4.4/bacula-gui-2.4.4.tar.gz/download
tar -zxvf bacula-gui-2.4.4.tar.gz
cd bacula-gui-2.4.4/bweb/
perl Makefile.PL
make install
pear channel-update pear.php.net
install -m 755 -o root -g root cgi/b*.pl /usr/lib/cgi-bin/
chown root:bacula /etc/bacula
echo '$VAR1 = { template_dir => "/usr/share/bweb/tpl" };' > /etc/bacula/bweb.conf
chown www-data /etc/bacula/bweb.conf
mkdir -p /usr/share/bweb/tpl
install -m 644 -o root -g root tpl/*.tpl /usr/share/bweb/tpl
mkdir /var/www/bweb
install -m 644 -o root -g root html/*.{js,png,css,gif,ico,html} /var/www/bweb
chmod 666 /etc/bacula/bconsole.conf
Next we must give the www-data user permission to execute the bconsole:
cd /etc
visudo
After the line
root ALL=(ALL) ALL
we add also this:
www-data ALL= NOPASSWD: /usr/bin/bconsole
Then in the bacula directory edit bweb.conf:
cd /etc/bacula
nano bweb.conf
and add the following to bweb.conf making your appropriate changes:
$VAR1 = bless( { 'graph_font' => '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf', 'name' => undef, 'config_file' => '/etc/bacula/bweb.conf', 'bconsole' => '/usr/bin/sudo /usr/bin/bconsole -n -c /etc/bacula/bconsole.conf', 'fv_write_path' => '/var/spool/bweb', 'password' => 'your bacula mysql password', 'template_dir' => '/usr/share/bweb/tpl', 'dbi' => 'DBI:mysql:database=bacula', 'error' => '', 'debug' => 0, 'user' => 'bacula', 'email_media' => 'your email', 'stat_job_table' => 'Job' }, 'Bweb::Config' );
After everything is done restart your system with:
shutdown –r now
Open up Firefox and go to http://yourserverip/cgi-bin/bweb.pl and you will have the bweb application installed and working.