]> git.sur5r.net Git - bacula/docs/blob - docs/bacula-web/general.tex
Fix typo reported by James
[bacula/docs] / docs / bacula-web / general.tex
1 %%
2 %%      
3
4 \section*{What is Bacula-web?}
5 \label{_ChapterStart1}
6 \index[general]{Bacula-web!What is }
7 \index[general]{What is Bacula-web? }
8 \addcontentsline{toc}{section}{What is Bacula-web?}
9
10
11 Bacula-web is a php based web program that provides you a
12 summarized output of jobs that have already run. It obtains 
13 its information from your Bacula catalog database. Aside from a
14 nice graphical display, it provides summaries of your 
15 jobs, as well as graphs of job usage. This is a fairly high
16 level Bacula management tool.
17
18 \section*{Requirements}
19 \index[general]{Requirements}
20 \addcontentsline{toc}{section}{Requirements}
21
22 \begin{itemize}
23 \item You must have a web server
24 \item You must have PHP installed and working
25       with your web server. We have tested 
26       php versions 4.3.4 and 5.0.4.  For more information
27       on php, please see:
28       \elink{http://www.php.net}{http://www.php.net}.
29 \item The following packages should be installed
30       or configured as part of PHP.
31    \begin{itemize}
32    \item Gettext (optional)
33    \item GD 2.x or greater
34    \item TrueType (optional)
35    \item Pear DB (http://pear.php.net/package/DB)
36    \item MySQL or PostgreSQL (SQLite is not supported)
37    \item The dbsize contrib package if you use PostgreSQL
38    \end{itemize}
39 \item Bacula must also be installed and working, but does not
40       need to be running to use Bacula-web.
41 \item Your MySQL or PostgreSQL program must be running.
42 \end{itemize}
43
44 \section*{Installation}
45 \index[general]{Installation}
46 \addcontentsline{toc}{section}{Installation}
47
48 \begin{itemize}
49 \item Copy the bacula-web distribution to the root
50    directory or a subdirectory of your web server root.
51 \item Edit {\bf configs/bacula.conf} and put your preferences
52    as well as ensuring that the database configuration parameters
53    point to the Bacula database you are using.
54 \item Make sure that {\bf short_open_tag} is turned on in your
55    php.ini file.
56 \end{item}
57
58
59 \section*{Testing the Installation}
60 \index[general]{Testing the Installation}
61 \addcontentsline{toc}{section}{Testing the Installation}
62
63 \begin{itemize}
64 \item Run {\bf test.php} from your web browser.
65    It should produce output that looks like:
66 \begin{verbatim}
67 Checking system for dependencies...
68
69  Checking gettext:  YES   Language support enabled    
70  Checking Pear(DB): YES   Pear DB enabled    
71  Checking GD:       YES   GD support enabled    
72
73
74  Please, click the link below to test your graph system capabilities
75  (Bacula-web only use PNG): Test
76 \end{verbatim}
77
78 \item If gettext, Pear(DB) and GD all indicate yes, then things are going
79    in the right direction. If not, you should correct each one before 
80    proceeding.
81
82 \item If Pear(DB) is not installed and you have PHP 4.3.11 or newer, you
83    can use the command:
84
85 \begin{verbatim}
86 pear install DB
87 \end{verbatim}
88 to install it.
89
90 After installing it, check by doing:
91
92 \begin{verbatim}
93 pear list
94 \end{verbatim}
95
96 On my machine (Kern), I get:
97 \begin{verbatim}
98 Installed packages:
99 ===================
100 Package              Version State
101 Archive_Tar          1.1     stable
102 Console_Getopt       1.2     stable
103 DB                   1.7.6   stable
104 HTML_Template_IT     1.1     stable
105 HTTP                 1.3.5   stable
106 Mail                 1.1.4   stable
107 Net_SMTP             1.2.6   stable
108 Net_Socket           1.0.6   stable
109 Net_UserAgent_Detect 2.0.1   stable
110 PEAR                 1.3.5   stable
111 XML_Parser           1.2.6   stable
112 XML_RPC              1.4.0   stable
113 \end{verbatim}
114
115
116
117 \item When everything is installed, click on the {\bf Test} link at the
118    bottom, which will bring up a new page with a number of PHPlot test graphs,
119    using GD. It should be pretty obvious if they work, if not, you must
120    correct the problems.
121
122 \item If your graphs are not being reproduced, check that your PHP was built
123    with the {\bf --with-gd} option, and possibly with {\bf --with-png-dir=DIR}
124    where DIR is the path to the {\bf libpng} installation directory.
125
126 \item One of the most common problem is improper configuration of the
127    variables in {\bf bacula.config} that define the database.  If you see
128    nothing but a blank screen or error messages, please recheck your database
129    definitions paying careful attention to ensure that the database name and
130    password are correct and that the database engine is running.  
131
132 \item If you get an error such as {\bf DB Error: not found} assuming your 
133    database is MySQL, try using the following command:
134
135    mysql -h\lt{}host\gt{} -u\lt{}login\gt{} -p \lt{}db_name\gt{}
136
137    where, \lt{}host\gt{}, \lt{}login\gt{}, and \lt{}db_name\gt{} are
138    the values you put in your {\bf bacula.conf} file under the 
139    DATABASE section as in:
140 \begin{verbatim}
141 [.DATABASE]
142 host = 192.168.1.120
143  
144 login = bacula-user
145 pass =
146 db_name = bacula
147 db_type = mysql
148 \end{verbatim}
149
150    in this case, the mysql command would be:
151
152    mysql -h192.168.1.120 -ubacula-user -p bacula
153
154 \item If you get an error such as {\bf DB Error: connection failed} assuming your
155    database is PostgreSQL, make sure that TCP/IP-Connections to your
156    bacula database are allowed via pg_hba.conf.
157
158
159 \item If nothing seems to be working and you are using SELinix, please
160    remember that you must have the correct contexts for the bacula-web
161    files. Assuming you have installed the files in
162    /var/www/html/bacula-web, you can most likely fix the contexts with 
163    a command such as:
164
165    chcon -t httpd_sys_content_t /var/www/html/bacula-web/ -R
166
167 \end{itemize}
168
169 \section*{Screen Shots}
170 \index[general]{Screen Shots}
171 \addcontentsline{toc}{section}{Screen Shots}
172
173 \includegraphics{./bweb-index.eps} \\
174 \includegraphics{./bweb-report.eps} \\
175
176  
177
178 \section*{Notes}
179 \index[general]{Notes}
180 \addcontentsline{toc}{section}{Notes}
181 The output from bacula-web is best viewed with a resolution of
182 1024x768 or better. Most browsers will produce good results including 
183 MS Internet Explorer.
184
185 If you have configured bacula-web for a language other than English,
186 and the language changes are not being correctly displayed, restart
187 your web server.
188
189 \section*{Bugs}
190 \index[general]{Bugs}
191 \addcontentsline{toc}{section}{Bugs}
192
193 \begin{itemize}
194 \item In the Pie graphs, the margins don't work. It is a phplot bug.
195 \item The total elapsed time "calculation" is rudimentary.  If you have 2
196 or more concurrent jobs this is not real.
197 \end{itemize}
198
199 Submit your bugs at this link: 
200 \elink{http://indpnday.com/bacula_stuff/bacula-web/mantisbt/login_page.php}
201 {http://indpnday.com/bacula_stuff/bacula-web/mantisbt/login_page.php}.
202
203
204 \section*{Translations}
205 \index[general]{Translations}
206 \addcontentsline{toc}{section}{Translations}
207 If you want add a new language not supported by bacula-web please, follow
208 the following instructions:
209
210 Extract strings with this command (tsmarty2c.php is with bacula-web 
211 package):\\
212
213 \begin{verbatim}
214 ./tsmarty2c.php templates > lang.c
215 xgettext lang.c
216 \end{verbatim}
217
218 Now you must have this file: messages.po \\
219 Edit messages.po to have your translations, then
220 send us a copy of the file.\\