Install webacula bacula backup server on CentOS/RHEL, Fedora

Overview

This post is in continuation with the last one, adding another web interface named webacula. Webacula is another popular web interface for bacula. Webacula let you manage restore jobs, backup jobs, job errors, added clients, storage, logbook etc.

Install webacula bacula backup server on CentOS/RHEL, Fedora

You need to install php-ZendFramework before Webacula.

Add remi and epel repositories.


# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Install ZendFramework and Db-Adapter for Mysql


# yum --enablerepo=remi install php-ZendFramework php-ZendFramework-Db-Adapter-Pdo-Mysql

Now download webacula, untar it and move it under /usr/share


# wget http://sourceforge.net/projects/webacula/files/latest/download
# tar zxvf webacula-5.5.1.tar.gz
# mv webacula-5.5.1 /usr/share/webacula
# cd /usr/share/webacula
# cd install/
# php check_system_requirements.php

Move to the library directory and create a symlink for Zend. You will find Zend under /usr/share/php/Zend/


# cd /usr/share/webacula/library/
# ln -s /usr/share/php/Zend/ .

Open db.conf file and add the password.


# cd /usr/share/webacula/install/
# vi db.conf

This password will be used to login to webacula console.


db_name="bacula"
db_user="root"
db_pwd="mysqlroot@123"

webacula_root_pwd="baculapass"

Execute the scripts to create db tables for webcaula.


# cd /usr/share/webacula/install/MySql/
# ./10_make_tables.sh
# ./20_acl_make_tables.sh

If you have bacula installed you would probably have bacula group, if not then add it. Add apache to bacula group.


# groupadd bacula
# usermod -aG bacula apache

Allow Apache to execute bconsole file using bconsole.conf configuration file. My bconsole binary is under /usr/local/bacula/bin/


# chown root:bacula /usr/local/bacula/bin/bconsole
# chmod u=rwx,g=rx,o= /usr/local/bacula/bin/bconsole

# chown root:bacula /usr/local/bacula/bin/bconsole.conf
# chmod u=rw,g=r,o= /usr/local/bacula/bin/bconsole.conf

Edit application/config.ini and add the bacula database name and credentials. Also remove sudo path and edit bacula.bconsole binary location. The sudo path would be /sbin/sudo, remove that and left the field blank as shown below


# vi /usr/share/webacula/application/config.ini

Edit the hostname, db name, root username and password


db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = mysqlroot@123
db.config.dbname = bacula

bacula.sudo = ""
bacula.bconsole = "/usr/local/bacula/bin/bconsole"

Copy the configuration file for Apache to /etc/httpd/conf.d


# cp /usr/share/webacula/install/apache/webacula.conf /etc/httpd/conf.d/

Edit the webacula.conf file.


# vi /etc/httpd/conf.d/webacula.conf

Add the allowed IP’s that can access webacula. If you wish to remove this restriction comment the Deny from all feild.


Allow from 192.161.150.0/255.255.255.0

or

# Deny from all

Increase values in /etc/php.ini :


# vi /etc/php.ini

Set the values for the following variables.


memory_limit = 128M
max_execution_time = 300

Restart the Apache service


# /etc/init.d/httpd restart

webacula01 300x169 Install webacula bacula backup server on CentOS/RHEL, Fedora