]> git.sur5r.net Git - bacula/bacula/blob - gui/baculum/INSTALL
baculum: Add information about new method storing passwords
[bacula/bacula] / gui / baculum / INSTALL
1 1. Baculum overview
2 2. Baculum operating system environment
3   2.1 General requirements
4   2.2 Linux Fedora
5   2.3 Linux Debian
6 3. Preparing Baculum files
7 4. Preparing Apache Web Server
8 5. Example configuration VirtualHost
9 6. Useful configuration samples
10 7. Makefile
11
12 =========================================
13
14 1. Baculum overview
15
16
17 Baculum is Bacula web based interface. It enables Bacula administration
18 functions such as:
19
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
29 - other features...
30
31
32 2. Baculum operating system environment
33
34
35 2.1 General requirements
36
37
38 Environment for Baculum installation should have following components:
39
40 - Web Server - with mod_rewrite module loaded. Baculum has been
41 tested on Apache HTTP Server and Lighttpd.
42
43 - PHP 5.3 or higher - as web server module. PHP CLI interpreter is not needed.
44 PHP should have installed next 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 required is to use MySQL native driver.
48       It is php-mysqlnd for PHP, not php-mysql.
49     * BCMath PHP module.
50     * cURL PHP module.
51     * MB String PHP module.
52     * JSON PHP module.
53 - Bconsole - configured Bacula text based console
54 - Access to Bacula catalog database - computer with Baculum installation should be
55 able to connect to Bacula catalog database. There is not need to install Baculum
56 on server with Bacula Catalog DB because Baculum can communicate with Bacula database
57 located on remote server.
58
59 Above requirements are validated during Baculum start. So if in installation
60 environment there lacks some from these components then you be informed
61 about it.
62
63
64 2.2 Linux Fedora
65
66
67 Packages required for run Baculum in Fedora environment can be installed by command:
68
69 # yum install httpd \
70 php \
71 php-common \
72 php-pdo \
73 php-pgsql \
74 php-mysqlnd \
75 php-mbstring \
76 php-bcmath
77
78 In Fedora 20 PHP module for cURL support and for JSON support are compiled in PHP.
79
80 In case of using SELinux functionality in Baculum environment, recommended way
81 is switching "httpd_t" SELinux security domain to permissive domain like below:
82
83 # semanage permissive -a httpd_t
84
85 Please be sure that in PHP configuration file (usually located in /etc/php.ini)
86 there is option error_reporting set as below:
87
88 error_reporting = E_ALL & ~E_STRICT
89 memory_limit = 256M
90
91 Suggested method for Baculum webGUI access to Bacula Console (bconsole) is using
92 "sudo" functionality for that. In this case there is need to add to /etc/sudoers file two
93 lines according next template:
94
95 Defaults:apache_user    !requiretty
96 apache_user ALL= NOPASSWD:      bconsole_path
97
98 For example for user called "apache" from that HTTP service working with Baculum
99 there is need to add line like below:
100
101 Defaults:apache !requiretty
102 apache  ALL= NOPASSWD:  /usr/sbin/bconsole
103
104
105 2.3 Linux Debian
106
107
108 Packages required for run Baculum in Debian environment can be installed by command:
109
110 apt-get install apache2 \
111 libapache2-mod-php5 \
112 php5 \
113 php5-pgsql \
114 php5-mysql \
115 php5-curl \
116 php5-json
117
118 In Debian 7.4.0, PHP modules for BCMath and MultiByte String support are compiled in PHP.
119
120 There is need to create symbolic link as below, for enable mod_rewrite module in Apache.
121
122 # ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load
123
124 Please be sure that in PHP configuration file (usually located in /etc/php5/apache2/php.ini)
125 there is option error_reporting set as below:
126
127 error_reporting = E_ALL & ~E_STRICT
128 memory_limit = 256M
129
130 Suggested method for Baculum webGUI access to Bacula Console (bconsole) is using
131 "sudo" functionality for that. In this case there is need to add to /etc/sudoers below
132 line according next template:
133
134 Defaults:apache_user    !requiretty
135 apache_user ALL= NOPASSWD:      bconsole_path
136
137 For example for user called "www-data" from that HTTP service working with Baculum
138 there is need to add line like below:
139
140 Defaults:www-data       !requiretty
141 www-data        ALL= NOPASSWD:  /usr/sbin/bconsole
142
143
144 3. Preparing Baculum files
145
146
147 After downloading and unpacking Baculum sources archive there is need to set write
148 permissions for web server for three below directories:
149
150 /[files base location]/assets
151 /[files base location]/protected/Data
152 /[files base location]/protected/runtime
153
154 These directories permissions are validated during Baculum start. If web server
155 will not be able to write data in some from above directoriesthen you be
156 informed about this fact.
157
158
159 4. Preparing Apache Web Server
160
161
162 First there is need to configure authentication to Baculum from web server side.
163 Baculum supports HTTP Basic authentication from web server with passwords stored
164 in file:
165
166 ./protected/Data/baculum.users
167
168 NOTE!
169 There is possible to use another location than:
170  ./protected/Data/baculum.users
171 however then is required provide the same auth data in Baculum initial wizard.
172
173 In Apache web server this authentication method may be realizing by next directives
174 declaration in Apache configuration file:
175
176 AuthType Basic
177 AuthUserFile /var/www/baculum/protected/Data/baculum.users
178 Require valid-user
179
180 For creating passwords file you can use htpasswd binary file in next way:
181
182 # htpasswd -c /var/www/baculum/protected/Data/baculum.users someuser
183
184 You will be asked about inputting password and retype password for user.
185
186 NOTE!
187 "-c" switcher you should use only for new created passwords file. For existing
188 passwords file "-c" switcher should not be provided.
189
190 NOTE!
191 From version 7.2.0 plain text passwords for HTTP Basic authentication are no longer
192 supported by Baculum. For more information please see README file (FAQ, point "b").
193
194 At the end there is need to give web server user possibility to manage the auth file:
195 For example:
196
197 chown www-data:www-data /var/www/baculum/protected/Data/baculum.users
198
199
200 5. Example configuration VirtualHost
201
202
203 <VirtualHost *:80>
204         DocumentRoot /var/www/baculum
205         ServerName somehost.example.com
206         <Directory /var/www/baculum>
207                 AllowOverride All
208                 AuthType Basic
209                 AuthName MyPrivateFile
210                 AuthUserFile /var/www/baculum/protected/Data/baculum.users
211                 Require valid-user
212         </Directory>
213 </VirtualHost>
214
215
216 Above configuration should be written in a new Apache configuration file.
217 for example, location for that can be put to /etc/apache2/sites-enabled/baculum.conf.
218
219 In this way, configuration file baculum.conf will be loaded automatically during
220 Apache server start.
221
222
223 6. Useful configuration samples
224
225
226 In directory examples/ exists following configuration samples:
227  ./examples/selinux/                                 <=== SELinux module example
228  ./examples/selinux/baculum.te                       <--- SELinux text module format
229  ./examples/selinux/baculum.pp                       <--- SELinux binary module format
230  ./examples/deb/                                     <=== samples for some deb-based distributions
231  ./examples/deb/baculum.lighttpd.conf                <--- sample Lighttpd config
232  ./examples/deb/baculum.users                        <--- sample HTTP Basic auth file (user: admin, pass: admin)
233  ./examples/rpm-template/                            <=== Directory with templates used by Makefile
234  ./examples/rpm-template/baculum-apache.conf         <--- Apache config template
235  ./examples/rpm-template/baculum-lighttpd.service    <--- Baculum systemd unit for Lighttpd
236  ./examples/rpm-template/baculum.spec                <--- SPEC file
237  ./examples/rpm-template/baculum-lighttpd.conf       <--- Lighttpd config template
238  ./examples/rpm-template/baculum.users               <--- HTTP Basic auth file used by SPEC (user: admin, pass: admin)
239  ./examples/rpm-template/baculum.startup             <--- Baculum SysVinit startup script
240  ./examples/sudo/                                    <=== example sudoers.d configurations
241  ./examples/sudo/baculum-httpd                       <--- sample sudo for Apache user
242  ./examples/sudo/baculum-lighttpd                    <--- sample sudo for Lighttpd
243  ./examples/rpm/                                     <=== samples for some rpm-based distributions
244  ./examples/rpm/baculum-apache.conf                  <--- Apache config file
245  ./examples/rpm/baculum-lighttpd.service             <--- Baculum system unit
246  ./examples/rpm/baculum.spec                         <--- example SPEC file
247  ./examples/rpm/baculum-lighttpd.conf                <--- Lighttpd config file
248  ./examples/rpm/baculum.users                        <--- HTTP Basic auth file (user: admin, pass: admin)
249  ./examples/rpm/baculum.startup                      <--- Baculum SysVinit startup script
250
251
252 7 Makefile
253
254
255 Together with Baculum source code is provided Makefile file. The Makefile is dedicated
256 mainly for separating and generating runtime files (including web servers configuration,
257 systemd unit and others).
258
259 Generating runtime files can be useful to prepare Baculum binary packages by execute
260 the Makefile in deb metafiles or in rpm SPEC file.
261
262 Example usage:
263
264 # cd baculum/
265 # make DESTDIR=/home/abc/baculum_runtime