2 2. Operating system environment
3 2.1 General requirements
6 3. Preparing Baculum files
7 4. Preparing Apache Web Server
8 5. Example VirtualHost configuration
9 6. Useful configuration samples
12 =========================================
17 Baculum is Bacula web based interface. It enables Bacula administration
20 - Running Bacula jobs (backup, restore, verify...)
21 - Monitoring Bacula services by getting status these services
22 - Bacula console available via web interface
23 - Support for customized and restricted consoles (Console ACL functionality)
24 - Multiple Directors support
25 - Volumes management including labeling new volumes
26 - User friendly graphs
27 - Basic storage daemon operations on volumes (mount, umount, release actions)
28 - Easy in use configuration and restore wizards
32 2. Operating system environment
35 2.1 General requirements
38 Environment for Baculum installation should have following components:
40 - Web Server - with mod_rewrite module loaded. Baculum has been
41 tested with Apache HTTP Server and Lighttpd.
43 - PHP 5.3 or higher - PHP CLI interpreter is unneeded.
44 PHP should have installed following modules:
45 * PDO PHP support - depending on your catalog database: PDO PostgreSQL,
46 PDO MySQL or PDO SQLite.
47 Note, in case using MySQL database there is required to use MySQL native driver.
48 It is php-mysqlnd for PHP, not php-mysql.
51 * MB String PHP module.
54 - Bconsole - configured Bacula text based console
55 - Access to Bacula catalog database - computer with Baculum installation should be
56 able to connect to Bacula catalog database. There is not need to install Baculum
57 on server with Bacula Catalog DB because Baculum can communicate with Bacula database
58 located on remote server.
60 Above requirements are validated during Baculum start. So if in installation
61 environment there is lack some from these components then you will be informed
68 Packages required to run Baculum in Fedora environment can be installed by command:
80 In Fedora 20 PHP module for cURL support and for JSON support are compiled in PHP.
82 In case of using SELinux functionality in Baculum environment there is need
83 to load SELinux policy module provided together with Baculum sources in location:
85 examples/selinux/baculum.pp
87 To load the policy module there can be used following command:
89 semodule -i baculum.pp
91 Source file the policies module is located in:
93 examples/selinux/baculum.te
96 Please make sure that in PHP configuration file (usually located in /etc/php.ini)
97 there is option error_reporting set as below:
99 error_reporting = E_ALL & ~E_STRICT
102 Suggested method for Baculum webGUI access to Bacula Console (bconsole) is using
103 "sudo" functionality for that. In this case there is need to add to /etc/sudoers file two
104 lines according to following template:
106 Defaults:apache_user !requiretty
107 apache_user ALL= NOPASSWD: bconsole_path
109 For example for user called "apache" from that HTTP service working with Baculum
110 there is need to add line like below:
112 Defaults:apache !requiretty
113 apache ALL= NOPASSWD: /usr/sbin/bconsole
119 Packages required to run Baculum in Debian environment can be installed by command:
121 # apt-get install apache2 \
122 libapache2-mod-php5 \
129 In Debian 7.4.0, PHP modules for BCMath and MultiByte String support are compiled in PHP.
131 There is need to create symbolic link as below, for enable mod_rewrite module in Apache.
133 # ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
135 Please make sure that in PHP configuration file (usually located in /etc/php5/apache2/php.ini)
136 there is option error_reporting set as below:
138 error_reporting = E_ALL & ~E_STRICT
141 Suggested method for Baculum webGUI access to Bacula Console (bconsole) is using
142 "sudo" functionality for that. In this case there is need to add to /etc/sudoers below
143 line according to following template:
145 Defaults:apache_user !requiretty
146 apache_user ALL= NOPASSWD: bconsole_path
148 For example for user called "www-data" from that HTTP service working with Baculum
149 there is need to add line like below:
151 Defaults:www-data !requiretty
152 www-data ALL= NOPASSWD: /usr/sbin/bconsole
155 3. Preparing Baculum files
158 After downloading and unpacking Baculum sources archive there is need to set write
159 permissions for web server for three below directories:
161 /[files base location]/assets
162 /[files base location]/protected/Data
163 /[files base location]/protected/runtime
165 These directories permissions are validated during Baculum start. If web server
166 will not be able to write data in some from above directories then you will be
167 informed about this fact.
170 4. Preparing Apache Web Server
173 First there is need to configure authentication to Baculum from web server side.
174 Baculum supports HTTP Basic authentication from web server with passwords stored
177 ./protected/Data/baculum.users
180 There is possible to use another location than:
181 ./protected/Data/baculum.users
182 however then is required provide the same auth data in Baculum initial wizard.
184 In Apache web server this authentication method may be realized by following
185 directives declaration in Apache configuration file:
188 AuthUserFile /var/www/baculum/protected/Data/baculum.users
191 For creating passwords file you can use htpasswd binary file in following way:
193 # htpasswd -c /var/www/baculum/protected/Data/baculum.users someuser
195 You will be asked about inputting password and retype password for user.
198 "-c" switcher you should use only for new created passwords file. For existing
199 passwords file "-c" switcher should not be typed.
202 From version 7.2.0 plain text passwords for HTTP Basic authentication are no longer
203 supported by Baculum. For more information please see README file (FAQ, point "b").
205 At the end there is need to give web server user possibility to manage the auth file,
208 # chown www-data:www-data /var/www/baculum/protected/Data/baculum.users
211 5. Example VirtualHost configuration
215 DocumentRoot /var/www/baculum
216 ServerName somehost.example.com
217 <Directory /var/www/baculum>
220 AuthName MyPrivateFile
221 AuthUserFile /var/www/baculum/protected/Data/baculum.users
227 Above configuration should be written in a new Apache configuration file.
228 for example, location for that can be put to /etc/apache2/sites-enabled/baculum.conf.
230 In this way, configuration file baculum.conf will be loaded automatically during
234 6. Useful configuration samples
237 In directory examples/ exists following configuration samples:
238 ./examples/selinux/ <=== SELinux module example
239 ./examples/selinux/baculum.te <--- SELinux text module format
240 ./examples/selinux/baculum.pp <--- SELinux binary module format
241 ./examples/deb/ <=== samples for some deb-based distributions
242 ./examples/deb/baculum.startup <--- Baculum SysVinit startup script
243 ./examples/deb/baculum.lighttpd.conf <--- sample Lighttpd config
244 ./examples/deb/baculum.users <--- sample HTTP Basic auth file (user: admin, pass: admin)
245 ./examples/deb/baculum-apache.conf <--- sample Apache config
246 ./examples/deb-template <=== Directory with templates used by Makefile
247 ./examples/deb-template/baculum.users <--- sample HTTP Basic auth file (user: admin, pass: admin)
248 ./examples/deb-template/baculum-lighttpd.conf <--- Lighttpd config template
249 ./examples/deb-template/baculum-lighttpd.service <--- Baculum systemd unit for Lighttpd
250 ./examples/deb-template/baculum-apache.conf <--- Apache config template
251 ./examples/rpm-template/ <=== Directory with templates used by Makefile
252 ./examples/rpm-template/baculum-apache.conf <--- Apache config template
253 ./examples/rpm-template/baculum-lighttpd.service <--- Baculum systemd unit for Lighttpd
254 ./examples/rpm-template/baculum.spec <--- SPEC file
255 ./examples/rpm-template/baculum-lighttpd.conf <--- Lighttpd config template
256 ./examples/rpm-template/baculum.users <--- HTTP Basic auth file used by SPEC (user: admin, pass: admin)
257 ./examples/rpm-template/baculum.startup <--- Baculum SysVinit startup script
258 ./examples/sudo/ <=== example sudoers.d configurations
259 ./examples/sudo/baculum-httpd <--- sample sudo for Apache user
260 ./examples/sudo/baculum-lighttpd <--- sample sudo for Lighttpd user
261 ./examples/sudo/baculum-nginx <--- sample sudo for Nginx user
262 ./examples/rpm/ <=== samples for some rpm-based distributions
263 ./examples/rpm/baculum-apache.conf <--- Apache config file
264 ./examples/rpm/baculum-lighttpd.service <--- Baculum system unit
265 ./examples/rpm/baculum.spec <--- example SPEC file
266 ./examples/rpm/baculum-lighttpd.conf <--- Lighttpd config file
267 ./examples/rpm/baculum.users <--- HTTP Basic auth file (user: admin, pass: admin)
268 ./examples/rpm/baculum.startup <--- Baculum SysVinit startup script
269 ./examples/nginx/ <=== example Nginx configurations
270 ./examples/nginx/php-fpm/baculum-php.conf <--- example PHP-FPM config for Nginx
271 ./examples/nginx/baculum.conf <--- sample Nginx config
277 Together with Baculum source code is provided Makefile file. The Makefile is dedicated
278 mainly for separating and generating runtime files (including web servers configuration,
279 systemd unit and others).
281 Generating runtime files can be useful to prepare Baculum binary packages by execute
282 the Makefile in deb metafiles or in rpm SPEC file.
287 # make DESTDIR=/home/abc/baculum_runtime