]> git.sur5r.net Git - bacula/bacula/blob - gui/baculum/INSTALL
baculum: Tweak note about using MySQL native driver for PHP
[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
10 =========================================
11
12 1. Baculum overview
13
14 Baculum is Bacula web based interface. It enables Bacula administration
15 functions such as:
16
17 - Running backup and restore tasks
18 - Monitoring Bacula services by getting status these services
19 - Bacula console available via web interface
20 - Support for customized and restricted consoles (Console ACL functionality)
21 - Multiple Directors support
22 - Volumes managenment including labeling new volumes
23 - Basic storage daemon operations on volumes (mount, umount, release actions)
24 - Easy in use configuration and restore wizards
25 - other features...
26
27 Note!
28 This Baculum release does not support Verify kind of jobs. Support for Verify
29 jobs will be implemented in next Baculum release.
30
31
32 2. Baculum operating system environment
33
34
35 2.1 General requirements
36
37
38 Environmnent for Baculum installation should have next components:
39
40 - Web Server - with mod_rewrite module loaded. Baculum has been
41 tested on Apache HTTP Server.
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 using 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 connection to Bacula catalog database. There is not need to install Baculum
56 on server with Bacula 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 will be informed
61 about it.
62
63
64 2.2 Linux Fedora
65
66
67 Packages required for run Baculum in Fedora environemnt 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 doman 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 environemnt 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 apache_user ALL= NOPASSWD:      bconsole_path
135
136 For example for user called "www-data" from that HTTP service working with Baculum
137 there is need to add line like below:
138
139 www-data        ALL= NOPASSWD:  /usr/sbin/bconsole
140
141
142 3. Preparing Baculum files
143
144
145 After downloading and unpacking Baculum sources archive there is need to set write
146 permissions for web server for three below directories:
147
148 /[files base location]/assets
149 /[files base location]/protected/Data
150 /[files base location]/protected/runtime
151
152 These directories permissions are validated during Baculum start. If web server
153 will not be able to write data in some from above directries then you will be
154 informed about this fact.
155
156
157 4. Preparing Apache Web Server
158
159
160 First there is need to configure authentication to Baculum from web server side.
161 Baculum supports HTTP Basic authentication from web server.
162
163 In Apache web server this authentication method may be realizing by next directives
164 declaration in Apache configuration file:
165
166 AuthType Basic
167 AuthUserFile /etc/apache2/passwords
168 Require valid-user
169
170 File located in /etc/apache2/passwords is an example file which contains users and
171 passwords. For generating passwords file you may use htpasswd binary file in next
172 way:
173
174 # htpasswd -c /etc/apache2/passwords someuser
175
176 You will be asked about inputing password and retype password for user.
177
178 NOTE!
179 "-c" switcher you should use only for new created passwords file. For existing
180 passwords file "-c" switcher should not be inputed.
181
182
183 5. Example configuration VirtualHost
184
185
186 <VirtualHost *:80>
187         DocumentRoot /var/www/baculum
188         ServerName somehost.example.com
189         <Directory /var/www/baculum>
190                 AllowOverride All
191                 AuthType Basic
192                 AuthName MyPrivateFile
193                 AuthUserFile /etc/apache2/passwords
194                 Require valid-user
195         </Directory>
196 </VirtualHost>
197
198
199 Above configuration should be writen in a new Apache configuration file.
200 for example, location for that can be put to /etc/apache2/sites-enabled/baculum.conf.
201
202 In this way, configuration file baculum.conf will be loaded automaticly during
203 Apache server start.