]> git.sur5r.net Git - bacula/docs/blob - docs/manual/install.tex
Update licenses
[bacula/docs] / docs / manual / install.tex
1 %%
2 %%
3
4 \section*{Installing Bacula}
5 \label{_ChapterStart17}
6 \index[general]{Bacula!Installing }
7 \index[general]{Installing Bacula }
8 \addcontentsline{toc}{section}{Installing Bacula}
9
10 \subsection*{General}
11 \index[general]{General }
12 \addcontentsline{toc}{subsection}{General}
13
14 In general, you will need the Bacula source release, and if you want to run a
15 Windows client, you will need the Bacula Windows binary release. However,
16 Bacula needs certain third party packages (such as {\bf SQLite}, {\bf MySQL}, or
17 {\bf PostgreSQL}
18 to build properly depending on the options you specify. To simplify your task,
19 we have combined a number of these packages into two {\bf depkgs} releases
20 (Dependency Packages). This can vastly simplify your life by providing you
21 with all the necessary packages rather than requiring you to find them on the
22 Web, load them, and install them. 
23
24 \subsection*{Source Release Files}
25 \index[general]{Source Files}
26 \index[general]{Release Files}
27 \addcontentsline{toc}{subsection}{Source Release File}
28 Beginning with Bacula 1.38.0, the source code has been broken into
29 four separate tar files each corresponding to a different module in
30 the Bacula CVS. The released files are:
31
32 \begin{description}
33 \item [bacula-1.38.0.tar.gz]
34   This is the primary source code release for Bacula. On each
35   release the version number (1.38.0) will be updated.
36
37 \item [bacula-docs-1.38.0.tar.gz]
38   This file contains a copy of the docs directory with the
39   documents prebuild. English html directory, single html
40   file, and pdf file. The French and German translations
41   are in progress, but are not built.
42
43 \item [bacula-gui-1.38.0.tar.gz]
44   This file contains the non-core GUI programs. Currently,
45   it contains bacula-web, a PHP program for producing management
46   viewing of your Bacula job status in a browser; and bimagemgr
47   a browser program for burning CDROM images with Bacula Volumes.
48
49 \item [bacula-rescue-1.8.1.tar.gz]
50   This is the Bacula Rescue CDROM code. Note, the version number
51   of this package is not tied to the Bacula release version, so
52   it will be different.  Using this code, you can burn a CDROM
53   with your system configuration and containing a statically
54   linked version of the File daemon. This can permit you to easily
55   repartition and reformat your hard disks and reload your
56   system with Bacula in the case of a hard disk failure.
57
58 \item [winbacula-1.38.0.exe]
59   This file is the 32 bit Windows installer for installing
60   the Windows client (File daemon) on a Windows machine.
61
62 \end{description}
63
64 \label{upgrading1}
65 \subsection*{Upgrading Bacula}
66 \index[general]{Bacula!Upgrading }
67 \index[general]{Upgrading Bacula }
68 \addcontentsline{toc}{subsection}{Upgrading Bacula}
69
70 If you are upgrading from one Bacula version to another, you should first
71 carefully read the ReleaseNotes of all versions between your current version
72 and the version to which you are upgrading. If the Bacula catalog database has
73 been upgraded, you will either need to reinitialize your database starting
74 from scratch, or save an ASCII copy of your database, then proceed to upgrade
75 it. This is normally done after Bacula is build and installed by:
76
77 \begin{verbatim}
78 cd <installed-scripts-dir> (default /etc/bacula)
79 ./update_bacula_tables
80 \end{verbatim}
81
82 This update script can also be find in the Bacula source src/cats
83 directory.
84
85 If there are several database upgrades between your version and the
86 version to which you are upgrading, you will need to apply each database
87 upgrade script. For your convenience, you can find all the old upgrade scripts
88 in the {\bf upgradedb} directory of the source code. You will need to edit the
89 scripts to correspond to your system configuration. The final upgrade script,
90 if any, can be applied as noted above.
91
92 If you are upgrading from one major version to another, you will need to
93 replace all your components at the same time as generally the inter-daemon
94 protocol will change. However, within any particular release (e.g. version
95 1.32.x) unless there is an oversight or bug, the daemon protocol will not
96 change. If this is confusing, simply read the ReleaseNotes very carefully as
97 they will note if all daemons must be upgraded at the same time. 
98
99 Finally, please note that in general it is not necessary to do a 
100 {\bf make uninstall} before doing an upgrade. In fact, if you do so, you will 
101 most likely delete all your conf files, which could be disastrous.
102 The normal procedure during an upgrade is simply:
103 \begin{verbatim}
104 ./configure (your options)
105 make
106 make install
107 \end{verbatim}
108
109 In general none of your existing .conf or .sql files will be overwritten.
110
111 For additional information on upgrading, please see the \ilink{Upgrading Bacula
112 Versions}{upgrading} in the Tips chapter of this manual.
113
114
115 \subsection*{Dependency Packages}
116 \label{Dependency}
117 \index[general]{Dependency Packages }
118 \index[general]{Packages!Dependency }
119 \addcontentsline{toc}{subsection}{Dependency Packages}
120
121 As discussed above, we have combined a number of third party packages that
122 Bacula might need into the {\bf depkgs} and {\bf depkgs1} releases. You can,
123 of course, get the latest packages from the original authors. The locations of
124 where we obtained the packages are in the README file in each package.
125 However, be aware that the packages in the depkgs files have been tested by us
126 for compatibility with Bacula. 
127
128 Typically, a dependency package will be named {\bf depkgs-ddMMMyy.tar.gz} and
129 {\bf depkgs1-ddMMyy.tar.gz} where {\bf dd} is the day we release it, {\bf MMM}
130 is the abbreviated month (e.g. Jan), and {\bf yy} is the year. An actual
131 example is: {\bf depkgs-07Apr02.tar.gz}. To install and build this package (if
132 needed), you do the following: 
133
134 \begin{enumerate}
135 \item Create a {\bf bacula} directory, into which you will place  both the
136    Bacula source as well as the dependency package.  
137 \item Detar the {\bf depkg} into the {\bf bacula} directory.  
138 \item cd bacula/depkgs  
139 \item make 
140 \end{enumerate}
141
142 Although the exact composition of the dependency packages may change from time
143 to time, the current makeup is the following: 
144
145 \addcontentsline{lot}{table}{Dependency Packages}
146 \begin{longtable}{|l|l|l|l|}
147  \hline 
148 \multicolumn{1}{|c| }{\bf 3rd Party Package } & \multicolumn{1}{c| }{\bf
149 depkgs } & \multicolumn{1}{c| }{\bf depkgs1 } & \multicolumn{1}{c| }{\bf
150 depkgs-win32  } \\
151  \hline {SQLite } & \multicolumn{1}{c| }{X } & \multicolumn{1}{c| }{- } &
152 \multicolumn{1}{c| }{-  } \\
153  \hline {mtx } & \multicolumn{1}{c| }{X } & \multicolumn{1}{c| }{- } &
154 \multicolumn{1}{c| }{-  } \\
155  \hline {readline } & \multicolumn{1}{c| }{- } & \multicolumn{1}{c| }{X } &
156 \multicolumn{1}{c| }{-  } \\
157  \hline {pthreads } & \multicolumn{1}{c| }{- } & \multicolumn{1}{c| }{- } &
158 \multicolumn{1}{c| }{X  } \\
159  \hline {zlib } & \multicolumn{1}{c| }{- } & \multicolumn{1}{c| }{- } &
160 \multicolumn{1}{c| }{X  } \\
161  \hline {wxWidgets } & \multicolumn{1}{c| }{- } & \multicolumn{1}{c| }{- } &
162 \multicolumn{1}{c| }{X }
163 \\ \hline 
164
165 \end{longtable}
166
167 Note, some of these packages are quite large, so that building them can be a
168 bit time consuming. The above instructions will build all the packages
169 contained in the directory. However, when building Bacula, it will take only
170 those pieces that it actually needs. 
171
172 Alternatively, you can make just the packages that are needed. For example, 
173
174 \footnotesize
175 \begin{verbatim}
176 cd bacula/depkgs
177 make sqlite
178 \end{verbatim}
179 \normalsize
180
181 will configure and build only the SQLite package. 
182
183 You should build the packages that you will require in {\bf depkgs} and/or
184 {\bf depkgs1} prior to configuring and building Bacula, since Bacula will need
185 them during the build process. 
186
187 Even if you do not use SQLite, you might find it worthwhile to build {\bf mtx}
188 because the {\bf tapeinfo} program that comes with it can often provide you
189 with valuable information about your SCSI tape drive (e.g. compression,
190 min/max block sizes, ...). 
191
192 The {\bf depkgs-win32} package contains the source code for the pthreads,
193 zlib, and wxWidgets libraries used by the native Win32 client program.  It
194 will only be needed if you intend to build the Win32 client from source.
195
196 \subsection*{Supported Operating Systems}
197 \label{Systems}
198 \index[general]{Systems!Supported Operating }
199 \index[general]{Supported Operating Systems }
200 \addcontentsline{toc}{subsection}{Supported Operating Systems}
201
202 Please see the 
203 \ilink{ Supported Operating Systems}{SupportedOSes} section
204 of the QuickStart chapter of this manual. 
205
206 \subsection*{Building Bacula from Source}
207 \label{Building}
208 \index[general]{Source!Building Bacula from }
209 \index[general]{Building Bacula from Source }
210 \addcontentsline{toc}{subsection}{Building Bacula from Source}
211
212 The basic installation is rather simple. 
213
214 \begin{enumerate}
215 \item Install and build any {\bf depkgs} as noted above.  
216 \item Configure and install MySQL or PostgreSQL (if desired). 
217    \ilink{Installing and Configuring MySQL Phase I}{_ChapterStart} or  
218    \ilink{Installing and Configuring PostgreSQL Phase
219    I}{_ChapterStart10}.  If you are installing from rpms, and are
220    using MySQL, please be sure to install  {\bf mysql-devel}, so that the MySQL
221    header files are available  while compiling Bacula. In addition, the MySQL
222    client  library {\bf mysqlclient} requires the gzip compression library  {\bf
223    libz.a} or {\bf libz.so}. If you are using rpm packages,  these libraries are
224    in the {\bf libz-devel} package. On Debian  systems, you will need to load the
225    {\bf zlib1g-dev} package. If  you are not using rpms or debs, you will need to
226    find the  appropriate package for your system.  
227
228    Note, if you already have a running MySQL or PostgreSQL on your system, you 
229    can skip this phase provided that you have built the thread  safe libraries.
230    And you have already installed the additional  rpms noted above.  
231
232 \item As an alternative to MySQL and PostgreSQL, configure and install SQLite,
233     which is part of the {\bf depkgs}.  
234    \ilink{Installing and Configuring SQLite}{_ChapterStart33}. SQLite is
235    probably not suited to a fair size production environment because it
236    tends to be slow compared to MySQL and it has few or poor tools for
237    repairing database damage.
238      
239
240 \item Detar the Bacula source code preferably into the {\bf bacula}  directory
241    discussed above.  
242
243 \item {\bf cd} to the directory containing the source code.  
244
245 \item ./configure (with appropriate options as described below)  
246
247 \item Check the output of ./configure very carefully, especially  the Install
248    binaries and Install config directories.  If they are not correct,
249    please rerun ./configure until they  are. The output from ./configure is
250    stored in {\bf config.out}  and can be re-displayed at any time without
251    rerunning the  ./configure by doing {\bf cat config.out}.  
252
253 \item If after running ./configure once, you decide to change options  and
254    re-run it, that is perfectly fine, but before re-running it,  you should run: 
255
256
257 \footnotesize
258 \begin{verbatim}
259       make distclean
260 \end{verbatim}
261 \normalsize
262
263 so that you are sure to start from scratch and not have a  mixture of the two
264 options. This is because ./configure  caches much of the information. The {\bf
265 make distclean}  is also critical if you move the source directory from one 
266 machine to another. If the {\bf make distclean} fails,  just ignore it and
267 continue on.  
268
269 \item make  
270 \begin{verbatim}
271
272 \end{verbatim}
273    If you get errors while linking in the Storage daemon directory
274    (src/stored), it is probably because you have not loaded the static
275    libraries on your system.  I noticed this problem on a Solaris system.
276    To correct it, make sure that you have not added {\bf
277    {-}{-}enable-static-tools} to the {\bf ./configure} command.
278
279    If you skip this step ({\bf make}) and proceed immediately to the {\bf
280    make install} you are making two serious errors: 1.  your install will
281    fail because Bacula requires a {\bf make} before a {\bf make install}.
282    2.  you are depriving yourself of the chance to make sure there are no
283    errors before beginning to write files to your system directories.
284                                  
285
286 \item make install  
287    Please be sure you have done a {\bf make} before entering this command,
288    and that everything has properly compiled and linked without errors.
289
290
291 \item If you are new to Bacula, we {\bf strongly} recommend that you skip
292    the next step and use the default configuration files, then run the
293    example program in the next chapter, then come back and modify your
294    configuration files to suit your particular needs.
295
296 \item Customize the configuration files for each of the three daemons 
297    (Directory, File, Storage) and for the Console program.  For the details
298    of how to do this, please see \ilink{Setting Up Bacula Configuration
299    Files}{_ChapterStart16} in the Configuration chapter of this manual.  We
300    recommend that you start by modifying the default configuration files
301    supplied, making the minimum changes necessary.  Complete customization
302    can be done after you have Bacula up and running.  Please take care when
303    modifying passwords, which were randomly generated, and the {\bf Name}s
304    as the passwords and names must agree between the configuration files
305    for security reasons.  
306
307 \item Create the Bacula MySQL database and tables
308    (if using MySQL)
309       \ilink{Installing and Configuring MySQL Phase II}{mysql_phase2} or 
310       create the Bacula PostgreSQL database and tables  
311    \ilink{Installing and Configuring PostgreSQL Phase
312    II}{PostgreSQL_phase2} or alternatively  if you are using
313    SQLite  
314    \ilink{Installing and Configuring SQLite Phase II}{phase2}.  
315
316 \item Start Bacula ({\bf ./bacula start}) Note. the next chapter  shows you
317    how to do this in detail.  
318
319 \item Interface with Bacula using the Console program  
320
321 \item For the previous two items, please follow the instructions  in the 
322    \ilink{Running Bacula}{_ChapterStart1} chapter of  this manual,
323    where you will run a simple backup and do a  restore. Do this before you make
324    heavy modifications to the  configuration files so that you are sure that
325    Bacula works  and are familiar with it. After that changing the conf files 
326    will be easier.  
327
328 \item If after installing Bacula, you decide to "move it", that is  to
329    install it in a different set of directories, proceed  as follows:  
330
331 \footnotesize
332 \begin{verbatim}
333       make uninstall
334       make distclean
335       ./configure (your-new-options)
336       make
337       make install
338       
339 \end{verbatim}
340 \normalsize
341
342 \end{enumerate}
343
344 If all goes well, the {\bf ./configure} will correctly determine which
345 operating system you are running and configure the source code appropriately.
346 Currently, FreeBSD, Linux (RedHat), and Solaris are supported. MacOS X 10.3 is
347 reported to work with the Client only as long as readline support is disabled.
348
349
350 If you install Bacula on more than one system, and they are identical, you can
351 simply transfer the source tree to that other system and do a "make
352 install". However, if there are differences in the libraries or OS versions,
353 or you wish to install on a different OS, you should start from the original
354 compress tar file. If you do transfer the source tree, and you have previously
355 done a ./configure command, you MUST do: 
356
357 \footnotesize
358 \begin{verbatim}
359 make distclean
360 \end{verbatim}
361 \normalsize
362
363 prior to doing your new ./configure. This is because the GNU autoconf tools
364 cache the configuration, and if you re-use a configuration for a Linux machine
365 on a Solaris, you can be sure your build will fail. To avoid this, as
366 mentioned above, either start from the tar file, or do a "make distclean". 
367
368 In general, you will probably want to supply a more complicated {\bf
369 configure} statement to ensure that the modules you want are built and that
370 everything is placed into the correct directories. 
371
372 For example, on RedHat, one could use the following: 
373
374 \footnotesize
375 \begin{verbatim}
376 CFLAGS="-g -Wall" \
377   ./configure \
378     --sbindir=$HOME/bacula/bin \
379     --sysconfdir=$HOME/bacula/bin \
380     --with-pid-dir=$HOME/bacula/bin/working \
381     --with-subsys-dir=$HOME/bacula/bin/working \
382     --with-mysql=$HOME/mysql \
383     --with-working-dir=$HOME/bacula/bin/working \
384     --with-dump-email=$USER
385 \end{verbatim}
386 \normalsize
387
388 Note, the advantage of using the above configuration to start is that
389 everything will be put into a single directory, which you can later delete
390 once you have run the examples in the next chapter and learned how Bacula
391 works. In addition, the above can be installed and run as non-root. 
392
393 For the developer's convenience, I have added a {\bf defaultconfig} script to
394 the {\bf examples} directory. This script contains the statements that you
395 would normally use, and each developer/user may modify them to suit his needs.
396 You should find additional useful examples in this directory as well. 
397
398 The {\bf \verb:--:enable-conio} or {\bf \verb:--:enable-readline} options are useful because
399 they provide a command line history and editing capability for the Console
400 program. If you have included either option in the build, either the {\bf
401 termcap} or the {\bf ncurses} package will be needed to link. On some systems,
402 such as SuSE, the termcap library is not in the standard library directory. As
403 a consequence, the option may be disabled or you may get an error message such
404 as: 
405
406 \footnotesize
407 \begin{verbatim}
408 /usr/lib/gcc-lib/i586-suse-linux/3.3.1/.../ld:
409 cannot find -ltermcap
410 collect2: ld returned 1 exit status
411 \end{verbatim}
412 \normalsize
413
414 while building the Bacula Console. In that case, you will need to set the {\bf
415 LDFLAGS} environment variable prior to building. 
416
417 \footnotesize
418 \begin{verbatim}
419 export LDFLAGS="-L/usr/lib/termcap"
420 \end{verbatim}
421 \normalsize
422
423 The same library requirements apply if you wish to use the readline
424 subroutines for command line editing and history or
425  if you are using a MySQL library that requires encryption. If you need encryption,
426 you can either export the appropriate additional library options as shown
427 above or, alternatively, you can include them directly on the ./configure line
428 as in: 
429
430 \footnotesize
431 \begin{verbatim}
432 LDFLAGS="-lssl -lcyrpto" \
433    ./configure \
434       <your-options>
435 \end{verbatim}
436 \normalsize
437
438 On some systems such as Mandriva, readline tends to
439 gobble up prompts, which makes it totally useless. If this happens to you, use
440 the disable option, or if you are using version 1.33 and above try using {\bf
441 \verb:--:enable-conio} to use a built-in readline replacement. You will still need
442 either the termcap or the ncurses library, but it is unlikely that the {\bf conio}
443 package will gobble up prompts. 
444
445 readline is no longer supported after version 1.34.  The code within Bacula
446 remains, so it should be usable, and if users submit patches for it, I will
447 be happy to apply them.  However, due to the fact that each version of
448 readline seems to be incompatible with previous versions, and that there
449 are significant differences between systems, I can no longer afford to
450 support it.
451
452 \subsection*{What Database to Use?}
453 \label{DB}
454 \index[general]{What Database to Use? }
455 \index[general]{Use!What Database to }
456 \addcontentsline{toc}{subsection}{What Database to Use?}
457
458 Before building Bacula you need to decide if you want to use SQLite, MySQL, or
459 PostgreSQL. If you are not already running MySQL or PostgreSQL, you might
460 want to start by testing with SQLite. This will greatly simplify the setup for you
461 because SQLite is compiled into Bacula an requires no administration. It
462 performs well and is suitable for small to medium sized installations (maximum
463 10-20 machines). However, we should note that a number of users have
464 had unexplained database corruption with SQLite. For that reason, we
465 recommend that you install either MySQL or PostgreSQL for production
466 work.
467
468 If you wish to use MySQL as the Bacula catalog, please see the 
469 \ilink{Installing and Configuring MySQL}{_ChapterStart} chapter of
470 this manual. You will need to install MySQL prior to continuing with the
471 configuration of Bacula. MySQL is a high quality database that is very
472 efficient and is suitable for any sized installation. It is slightly more
473 complicated than SQLite to setup and administer because it has a number of
474 sophisticated features such as userids and passwords. It runs as a separate
475 process, is truly professional and can manage a database of any size. 
476
477 If you wish to use PostgreSQL as the Bacula catalog, please see the 
478 \ilink{Installing and Configuring PostgreSQL}{_ChapterStart10}
479 chapter of this manual. You will need to install PostgreSQL prior to
480 continuing with the configuration of Bacula. PostgreSQL is very similar to
481 MySQL, though it tends to be slightly more SQL92 compliant and has many more
482 advanced features such as transactions, stored procedures, and the such. It
483 requires a certain knowledge to install and maintain. 
484
485 If you wish to use SQLite as the Bacula catalog, please see 
486 \ilink{Installing and Configuring SQLite}{_ChapterStart33} chapter of
487 this manual. 
488
489 \subsection*{Quick Start}
490 \index[general]{Quick Start }
491 \index[general]{Start!Quick }
492 \addcontentsline{toc}{subsection}{Quick Start}
493
494 There are a number of options and important considerations given below
495 that you can skip for the moment if you have not had any problems building
496 Bacula with a simplified configuration as shown above. 
497       
498 If the ./configure process is unable to find specific libraries (e.g.    
499 libintl, you should ensure that the appropriate package is installed on
500 your system. Alternatively, if the package is installed in a non-standard
501 location (as far as Bacula is concerned), then there is generally an
502 option listed below (or listed with "./configure {-}{-}help" that will
503 permit you to specify the directory that should be searched. In other
504 cases, there are options that will permit you to disable to feature 
505 (e.g. {-}{-}disable-nls).
506
507 If you want to dive right into it, we recommend you skip to the next chapter,
508 and run the example program. It will teach you a lot about Bacula and as an
509 example can be installed into a single directory (for easy removal) and run as
510 non-root. If you have any problems or when you want to do a real installation,
511 come back to this chapter and read the details presented below. 
512
513 \subsection*{Configure Options}
514 \label{Options}
515 \index[general]{Options!Configure }
516 \index[general]{Configure Options }
517 \addcontentsline{toc}{subsection}{Configure Options}
518
519 The following command line options are available for {\bf configure} to
520 customize your installation. 
521
522 \begin{description}
523 \item [ {-}{-}sysbindir=\lt{}binary-path\gt{}]
524    \index[general]{{-}{-}sysbindir }
525    Defines where the Bacula  binary (executable) files will be placed during a
526    {\bf make  install} command.  
527
528 \item [ {-}{-}sysconfdir=\lt{}config-path\gt{}]
529    \index[general]{{-}{-}sysconfdir }
530    Defines where the Bacula configuration files should be placed during a
531    {\bf make install} command.
532
533 \item [ {-}{-}mandir=\lt{}path\gt{}]
534    \index[general]{{-}{-}mandir}
535    Note, as of Bacula version 1.39.14, the meaning of any path
536    specified is now changed to mean the top level man directory.
537    Previously the mandir specified the full path to where you
538    wanted the man files installed.
539    The man files will be installed in gzip'ed format under
540    mandir/man1 and mandir/man8 as appropriate.
541    For the install to succeed you must have {\bf gzip} installed
542    on your system.
543
544    By default, Bacula will install the Unix man pages in 
545    /usr/share/man/man1 and /usr/share/man/man8.  
546    If you wish the man page to be installed in
547    a different location, use this option to specify the path.
548    Note, the main HTML and PDF Bacula documents are in a separate
549    tar file that is not part of the source distribution.
550
551 \item [ {-}{-}datadir=\lt{}path\gt{}]
552    \index[general]{{-}{-}datadir}
553    If you translate Bacula or parts of Bacula into a different language
554    you may specify the location of the po files using the {\bf
555    {-}{-}datadir} option. You must manually install any po files as
556    Bacula does not (yet) automatically do so.
557
558
559 \item [ {-}{-}enable-smartalloc ]
560    \index[general]{{-}{-}enable-smartalloc }
561    This enables the inclusion of the Smartalloc orphaned buffer detection
562    code.  This option is highly recommended.  Because we never build
563    without this option, you may experience problems if it is not enabled.
564    In this case, simply re-enable the option.  We strongly recommend
565    keeping this option enabled as it helps detect memory leaks.  This
566    configuration parameter is used while building Bacula
567
568 \item [ {-}{-}enable-gnome ]
569    \index[general]{{-}{-}enable-gnome }
570    If you have GNOME installed on your computer including the
571    gnome development libraries, and you want to use the
572    GNOME GUI Console interface to Bacula, you must specify this option.
573    Doing so will build everything in the {\bf src/gnome-console} directory.
574
575 \item [ {-}{-}enable-wx-console ]
576    \index[general]{{-}{-}enable-wx-console }
577    If you have wxWidgets installed on your computer and you want to use the
578    wxWidgets GUI Console interface to Bacula, you must specify this option.
579    Doing so will build everything in the {\bf src/wx-console} directory.
580    This could also be useful to users who want a GUI Console and don't want
581    to install Gnome, as wxWidgets can work with GTK+, Motif or even X11
582    libraries.
583
584
585 \item [ {-}{-}enable-tray-monitor ]
586    \index[general]{{-}{-}enable-tray-monitor }
587    If you have GTK installed on your computer, you run a graphical
588    environment or a window manager compatible with the FreeDesktop system
589    tray standard (like KDE and GNOME) and you want to use a GUI to monitor
590    Bacula daemons, you must specify this option.  Doing so will build
591    everything in the {\bf src/tray-monitor} directory.
592
593 \item [ {-}{-}enable-static-tools]
594    \index[general]{{-}{-}enable-static-tools }
595    This option causes the linker to link the Storage daemon utility tools
596    ({\bf bls}, {\bf bextract}, and {\bf bscan}) statically.  This permits
597    using them without having the shared libraries loaded.  If you have
598    problems linking in the {\bf src/stored} directory, make sure you have
599    not enabled this option, or explicitly disable static linking by adding
600    {\bf \verb:--:disable-static-tools}.
601
602
603 \item [ {-}{-}enable-static-fd]
604    \index[general]{{-}{-}enable-static-fd }
605    This option causes the make process to build a {\bf static-bacula-fd} in
606    addition to the standard File daemon.  This static version will include
607    statically linked libraries and is required for the Bare Metal recovery.
608    This option is largely superseded by using {\bf make static-bacula-fd}
609    from with in the {\bf src/filed} directory.  Also, the {\bf
610    \verb:--:enable-client-only} option described below is useful for just
611    building a client so that all the other parts of the program are not
612    compiled.   
613      
614    When linking a static binary, the linker needs the static versions
615    of all the libraries that are used, so frequently users will 
616    experience linking errors when this option is used. The first 
617    thing to do is to make sure you have the static glibc library 
618    installed on your system. The second thing to do is the make sure
619    you do not specify {\bf {-}{-}openssl} or {\bf {-}{-}with-python}
620    on your ./configure statement as these options require additional
621    libraries. You may be able to enable those options, but you will
622    need to load additional static libraries.
623
624
625 \item [ {-}{-}enable-static-sd]
626    \index[general]{{-}{-}enable-static-sd }
627    This option causes the make process to build a {\bf static-bacula-sd} in
628    addition to the standard Storage daemon.  This static version will
629    include statically linked libraries and could be useful during a Bare
630    Metal recovery.
631
632    When linking a static binary, the linker needs the static versions
633    of all the libraries that are used, so frequently users will 
634    experience linking errors when this option is used. The first 
635    thing to do is to make sure you have the static glibc library 
636    installed on your system. The second thing to do is the make sure
637    you do not specify {\bf {-}{-}openssl} or {\bf {-}{-}with-python}
638    on your ./configure statement as these options require additional
639    libraries. You may be able to enable those options, but you will
640    need to load additional static libraries.
641
642  
643
644 \item [ {-}{-}enable-static-dir]
645    \index[general]{{-}{-}enable-static-dir }
646    This option causes the make process to build a {\bf static-bacula-dir}
647    in addition to the standard Director.  This static version will include
648    statically linked libraries and could be useful during a Bare Metal
649    recovery.
650
651    When linking a static binary, the linker needs the static versions
652    of all the libraries that are used, so frequently users will 
653    experience linking errors when this option is used. The first 
654    thing to do is to make sure you have the static glibc library 
655    installed on your system. The second thing to do is the make sure
656    you do not specify {\bf {-}{-}openssl} or {\bf {-}{-}with-python}
657    on your ./configure statement as these options require additional
658    libraries. You may be able to enable those options, but you will
659    need to load additional static libraries.
660
661
662 \item [ {-}{-}enable-static-cons]
663    \index[general]{{-}{-}enable-static-cons }
664    This option causes the make process to build a {\bf static-console} and
665    a {\bf static-gnome-console} in addition to the standard console.  This
666    static version will include statically linked libraries and could be
667    useful during a Bare Metal recovery.
668
669    When linking a static binary, the linker needs the static versions
670    of all the libraries that are used, so frequently users will 
671    experience linking errors when this option is used. The first 
672    thing to do is to make sure you have the static glibc library 
673    installed on your system. The second thing to do is the make sure
674    you do not specify {\bf {-}{-}openssl} or {\bf {-}{-}with-python}
675    on your ./configure statement as these options require additional
676    libraries. You may be able to enable those options, but you will
677    need to load additional static libraries.
678
679
680 \item [ {-}{-}enable-client-only]
681    \index[general]{{-}{-}enable-client-only }
682    This option causes the make process to build only the File daemon and
683    the libraries that it needs.  None of the other daemons, storage tools,
684    nor the console will be built.  Likewise a {\bf make install} will then
685    only install the File daemon.  To cause all daemons to be built, you
686    will need to do a configuration without this option.  This option
687    greatly facilitates building a Client on a client only machine.
688
689    When linking a static binary, the linker needs the static versions
690    of all the libraries that are used, so frequently users will 
691    experience linking errors when this option is used. The first 
692    thing to do is to make sure you have the static glibc library 
693    installed on your system. The second thing to do is the make sure
694    you do not specify {\bf {-}{-}openssl} or {\bf {-}{-}with-python}
695    on your ./configure statement as these options require additional
696    libraries. You may be able to enable those options, but you will
697    need to load additional static libraries.
698
699
700 \item [ {-}{-}enable-largefile]
701    \index[general]{{-}{-}enable-largefile }
702    This option (default) causes  Bacula to be built with 64 bit file address
703    support if it  is available on your system. This permits Bacula to read and 
704    write files greater than 2 GBytes in size. You may disable this  feature and
705    revert to 32 bit file addresses by using  {\bf \verb:--:disable-largefile}.  
706
707 \item [ {-}{-}disable-nls]
708    \index[general]{{-}{-}disable-nls}
709    By default, Bacula uses the GNU Native Language Support (NLS) libraries. On
710    some machines, these libraries may not be present or may not function 
711    correctly (especially on non-Linux implementations). In such cases, you
712    may specify {\bf {-}{-}disable-nls} to disable use of those libraries.
713    In such a case, Bacula will revert to using English.
714
715 \item [ {-}{-}with-sqlite=\lt{}sqlite-path\gt{}]
716    \index[general]{{-}{-}with-sqlite }
717    This enables use of the SQLite version 2.8.x database. The {\bf sqlite-path} is not
718    normally  specified as Bacula looks for the necessary components in  a
719    standard location ({\bf depkgs/sqlite}). See 
720    \ilink{Installing and Configuring SQLite}{_ChapterStart33} chapter of
721     this manual for more details.  
722
723    See the note below under the {-}{-}with-postgresql item.
724
725 \item [ {-}{-}with-sqlite3=\lt{}sqlite3-path\gt{}]
726    \index[general]{{-}{-}with-sqlite3 }
727    This enables use of the SQLite version 3.x database.  The {\bf
728    sqlite3-path} is not normally specified as Bacula looks for the
729    necessary components in a standard location ({\bf depkgs/sqlite3}).  See
730    \ilink{Installing and Configuring SQLite}{_ChapterStart33} chapter of
731    this manual for more details.
732
733 \item [ {-}{-}with-mysql=\lt{}mysql-path\gt{}]
734    \index[general]{{-}{-}with-mysql }
735    This enables building of the Catalog services for Bacula.  It assumes
736    that MySQL is running on your system, and expects it to be installed in
737    the {\bf mysql-path} that you specify.  Normally, if MySQL is installed
738    in a standard system location, you can simply use {\bf {-}{-}with-mysql}
739    with no path specification.  If you do use this option, please proceed
740    to installing MySQL in the \ilink{Installing and Configuring
741    MySQL}{_ChapterStart} chapter before proceeding with the configuration.
742
743    See the note below under the {-}{-}with-postgresql item.
744
745 \item [ {-}{-}with-postgresql=\lt{}path\gt{}]
746    \index[general]{{-}{-}with-postgresql }
747    This provides an explicit path to the PostgreSQL libraries if Bacula
748    cannot find it by default.  Normally to build with PostgreSQL, you would
749    simply use {\bf {-}{-}with-postgresql}.
750
751    Note, for Bacula to be configured properly, you must specify one
752    of the four database options supported.  That is:
753    {-}{-}with-sqlite, {-}{-}with-sqlite3, {-}{-}with-mysql, or
754    {-}{-}with-postgresql, otherwise the ./configure will fail.
755
756 \item [ {-}{-}with-openssl=\lt{}path\gt{}]
757    This configuration option is necessary if you want to enable TLS (ssl)
758    in Bacula. Normally, the {\bf path} specification is not necessary since
759    the configuration searches for the OpenSSL libraries in standard system
760    locations. Enabling OpenSSL in Bacula permits secure communications
761    between the daemons. For more information on using TLS, please see the
762    \ilink{Bacula TLS}{_ChapterStart61} chapter of this manual.
763
764
765 \item [ {-}{-}with-python=\lt{}path\gt{}]
766    \index[general]{{-}{-}with-python }
767    This option enables Bacula support for Python. If no path is 
768    supplied, configure will search the     
769    standard library locations for Python 2.2, 2.3, or 2.4. If it cannot
770    find the library, you will need to supply a path to your Python
771    library directory.  Please see the 
772    \ilink{Python chapter}{_ChapterStart60} for the details of using
773    Python scripting.
774
775 \item [ {-}{-}with-libintl-prefix=\lt{}DIR\gt{}]
776    \index[general]{{-}{-}with-libintl-prefix}
777    This option may be used to tell Bacula to search DIR/include and
778    DIR/lib for the libintl headers and libraries needed for Native
779    Language Support (NLS).
780
781 \item [ {-}{-}enable-conio]
782    \index[general]{{-}{-}enable-conio }
783    Tells Bacula to enable building the small, light weight readline
784    replacement routine.  It is generally much easier to configure than
785    readline, although, like readline, it needs either the termcap or
786    ncurses library.
787
788 \item [ {-}{-}with-readline=\lt{}readline-path\gt{}]
789    \index[general]{{-}{-}with-readline }
790    Tells Bacula where {\bf readline} is installed.  Normally, Bacula will
791    find readline if it is in a standard library.  If it is not found and no
792    {-}{-}with-readline is specified, readline will be disabled.  This
793    option affects the Bacula build.  Readline provides the Console program
794    with a command line history and editing capability and is no longer
795    supported, so you are on your own if you have problems.
796
797 \item [ {-}{-}enable-readline]
798    \index[general]{{-}{-}enable-readline }
799    Tells Bacula to enable readline support.  It is normally disabled due to the
800    large number of configuration  problems and the fact that the package seems to
801    change in incompatible  ways from version to version.  
802
803 \item [ {-}{-}with-tcp-wrappers=\lt{}path\gt{}]
804    \index[general]{{-}{-}with-tcp-wrappers }
805    This specifies that you  want TCP wrappers (man hosts\_access(5)) compiled in.
806    The path is optional since  Bacula will normally find the libraries in the
807    standard locations.  This option affects the Bacula build.  In specifying your
808    restrictions in the {\bf /etc/hosts.allow}  or {\bf /etc/hosts.deny} files, do
809    not use the {\bf twist}  option (hosts\_options(5)) or the Bacula process will
810    be terminated. Note, when setting up your {\bf /etc/hosts.allow}
811    or {\bf /etc/hosts.deny}, you must identify the Bacula daemon in
812    question with the name you give it in your conf file rather than the
813    name of the executable.
814    
815    For more information on configuring and testing TCP wrappers, please  see the 
816    \ilink{Configuring and Testing TCP Wrappers}{wrappers}  section
817    in the Security Chapter.  
818
819 \item [ {-}{-}with-working-dir=\lt{}working-directory-path\gt{} ]
820    \index[general]{{-}{-}with-working-dir }
821    This option is mandatory and specifies a directory  into which Bacula may
822    safely place files that  will remain between Bacula executions. For example, 
823    if the internal database is used, Bacula will keep  those files in this
824    directory.  This option is only used to modify the daemon  configuration
825    files. You may also accomplish the same  thing by directly editing them later.
826    The working directory  is not automatically created by the install process, so
827    you  must ensure that it exists before using Bacula for the  first time. 
828
829 \item [ {-}{-}with-base-port=\lt{}port=number\gt{}]
830    \index[general]{{-}{-}with-base-port }
831    In order to run,  Bacula needs three TCP/IP ports (one for the Bacula 
832    Console, one for the Storage daemon, and one for the File daemon).  The {\bf
833    \verb:--:with-baseport} option will automatically assign three  ports beginning at
834    the base port address specified. You may  also change the port number in the
835    resulting configuration  files. However, you need to take care that the
836    numbers  correspond correctly in each of the three daemon configuration 
837    files. The default base port is 9101, which assigns ports 9101  through 9103.
838    These ports (9101, 9102, and 9103) have been  officially assigned to Bacula by
839    IANA.  This option is only used  to modify the daemon configuration files. You
840    may also accomplish  the same thing by directly editing them later. 
841
842 \item [ {-}{-}with-dump-email=\lt{}email-address\gt{}]
843    \index[general]{{-}{-}with-dump-email }
844    This option specifies  the email address where any core dumps should be set.
845    This option  is normally only used by developers.  
846
847 \item [ {-}{-}with-pid-dir=\lt{}PATH\gt{}  ]
848    \index[general]{{-}{-}with-pid-dir }
849    This specifies where Bacula should place the process id  file during
850    execution. The default is: {\bf /var/run}.  This directory is not created by
851    the install process, so  you must ensure that it exists before using Bacula
852    the  first time.  
853
854 \item [ {-}{-}with-subsys-dir=\lt{}PATH\gt{}]
855    \index[general]{{-}{-}with-subsys-dir }
856    This specifies where Bacula should place the subsystem lock  file during
857    execution. The default is {\bf /var/run/subsys}.  Please make sure that you do
858    not specify the same directory  for this directory and for the {\bf sbindir}
859    directory.  This directory is used only within the autostart scripts.  The
860    subsys directory is not created by the Bacula install,  so you must be sure to
861    create it before using Bacula. 
862
863 \item [ {-}{-}with-dir-password=\lt{}Password\gt{}]
864    \index[general]{{-}{-}with-dir-password }
865    This option allows you to specify the password used to  access the Directory
866    (normally from the Console program).  If it is not specified, configure will
867    automatically create a random  password.  
868
869 \item [ {-}{-}with-fd-password=\lt{}Password\gt{} ]
870    \index[general]{{-}{-}with-fd-password }
871    This option allows you to specify the password used to  access the File daemon
872    (normally called from the Director).  If it is not specified, configure will
873    automatically create a random  password.  
874
875 \item [ {-}{-}with-sd-password=\lt{}Password\gt{} ]
876    \index[general]{{-}{-}with-sd-password }
877    This option allows you to specify the password used to  access the Directory
878    (normally called from the Director).  If it is not specified, configure will
879    automatically create a random  password.  
880
881 \item [ {-}{-}with-dir-user=\lt{}User\gt{} ]
882    \index[general]{{-}{-}with-dir-user }
883    This option allows you to specify the Userid used to run the Director.  The
884    Director must be started as root, but doesn't need to run as root, and
885    after doing preliminary initializations, it can "drop" to the UserId
886    specified on this option.  
887    If you specify this option, you must
888    create the User prior to running {\bf make install}, because the
889    working directory owner will be set to {\bf User}.
890                        
891
892 \item [ {-}{-}with-dir-group=\lt{}Group\gt{} ]
893    \index[general]{{-}{-}with-dir-group }
894    This option allows you to specify the GroupId used to  run the Director. The
895    Director must be started as root, but  doesn't need to run as root, and  after
896    doing preliminary initializations, it can "drop"  to the GroupId specified
897    on this option. 
898    If you specify this option, you must
899    create the Group prior to running {\bf make install}, because the
900    working directory group will be set to {\bf Group}.
901
902 \item [ {-}{-}with-sd-user=\lt{}User\gt{} ]
903    \index[general]{{-}{-}with-sd-user }
904    This option allows you to specify the Userid used to  run the Storage daemon.
905    The Storage daemon must be started as root, but  doesn't need to run as root,
906    and  after doing preliminary initializations, it can "drop"  to the UserId
907    specified on this option. If you use this option,  you will need to take care
908    that the Storage daemon has access  to all the devices (tape drives, ...) that
909    it needs. 
910
911 \item [ {-}{-}with-sd-group=\lt{}Group\gt{} ]
912    \index[general]{{-}{-}with-sd-group }
913    This option allows you to specify the GroupId used to  run the Storage daemon.
914    The Storage daemon must be started as root, but  doesn't need to run as root,
915    and  after doing preliminary initializations, it can "drop"  to the GroupId
916    specified on this option. 
917
918 \item [ {-}{-}with-fd-user=\lt{}User\gt{} ]
919    \index[general]{{-}{-}with-fd-user }
920    This option allows you to specify the Userid used to  run the File daemon. The
921    File daemon must be started as root,  and in most cases, it needs to run as
922    root, so this option is  used only in very special cases,  after doing
923    preliminary initializations, it can "drop"  to the UserId specified on this
924    option. 
925
926 \item [ {-}{-}with-fd-group=\lt{}Group\gt{} ]
927    \index[general]{{-}{-}with-fd-group }
928    This option allows you to specify the GroupId used to  run the File daemon.
929    The File daemon must be started as root, and  in most cases, it must be run as
930    root, however,  after doing preliminary initializations, it can "drop"  to
931    the GroupId specified on this option. 
932
933 \end{description}
934
935 Note, many other options are presented when you do a {\bf ./configure
936 \verb:--:help}, but they are not implemented.
937
938 \subsection*{Recommended Options for most Systems}
939 \index[general]{Systems!Recommended Options for most }
940 \index[general]{Recommended Options for most Systems }
941 \addcontentsline{toc}{subsection}{Recommended Options for most Systems}
942
943 For most systems, we recommend starting with the following options: 
944
945 \footnotesize
946 \begin{verbatim}
947 ./configure \
948   --enable-smartalloc \
949   --sbindir=$HOME/bacula/bin \
950   --sysconfdir=$HOME/bacula/bin \
951   --with-pid-dir=$HOME/bacula/bin/working \
952   --with-subsys-dir=$HOME/bacula/bin/working \
953   --with-mysql=$HOME/mysql \
954   --with-working-dir=$HOME/bacula/working
955 \end{verbatim}
956 \normalsize
957
958 If you want to install Bacula in an installation directory rather than run it
959 out of the build directory (as developers will do most of the time), you
960 should also include the \verb:--:sbindir and \verb:--:sysconfdir options with appropriate
961 paths. Neither are necessary if you do not use "make install" as is the case
962 for most development work. The install process will create the sbindir and
963 sysconfdir if they do not exist, but it will not automatically create the
964 pid-dir, subsys-dir, or working-dir, so you must ensure that they exist before
965 running Bacula for the first time. See below for an example of how Kern does
966 it. 
967
968 \subsection*{RedHat}
969 \index[general]{RedHat }
970 \addcontentsline{toc}{subsection}{RedHat}
971
972 Using SQLite: 
973
974 \footnotesize
975 \begin{verbatim}
976  
977 CFLAGS="-g -Wall" ./configure \
978   --sbindir=$HOME/bacula/bin \
979   --sysconfdir=$HOME/bacula/bin \
980   --enable-smartalloc \
981   --with-sqlite=$HOME/bacula/depkgs/sqlite \
982   --with-working-dir=$HOME/bacula/working \
983   --with-pid-dir=$HOME/bacula/bin/working \
984   --with-subsys-dir=$HOME/bacula/bin/working \
985   --enable-gnome \
986   --enable-conio
987 \end{verbatim}
988 \normalsize
989
990 or 
991
992 \footnotesize
993 \begin{verbatim}
994  
995 CFLAGS="-g -Wall" ./configure \
996   --sbindir=$HOME/bacula/bin \
997   --sysconfdir=$HOME/bacula/bin \
998   --enable-smartalloc \
999   --with-mysql=$HOME/mysql \
1000   --with-working-dir=$HOME/bacula/working
1001   --with-pid-dir=$HOME/bacula/bin/working \
1002   --with-subsys-dir=$HOME/bacula/bin/working
1003   --enable-gnome \
1004   --enable-conio
1005 \end{verbatim}
1006 \normalsize
1007
1008 or finally, a completely traditional RedHat Linux install: 
1009
1010 \footnotesize
1011 \begin{verbatim}
1012 CFLAGS="-g -Wall" ./configure \
1013   --prefix=/usr \
1014   --sbindir=/usr/sbin \
1015   --sysconfdir=/etc/bacula \
1016   --with-scriptdir=/etc/bacula \
1017   --enable-smartalloc \
1018   --enable-gnome \
1019   --with-mysql \
1020   --with-working-dir=/var/bacula \
1021   --with-pid-dir=/var/run \
1022   --with-subsys-dir=/var/lock/subsys \
1023   --enable-conio
1024 \end{verbatim}
1025 \normalsize
1026
1027 Note, Bacula assumes that /var/bacula, /var/run, and /var/loc/subsys exist so
1028 it will not automatically create them during the install process. 
1029
1030 Note, with gcc (GCC) 4.0.1 20050727 (Red Hat 4.0.1-5) on
1031 an AMD64 CPU running 64 bit CentOS4, there is a compiler bug that generates
1032 bad code that causes Bacula to segment fault.  Typically you will see this
1033 in the Storage daemon first.  The solution is to compile Bacula ensuring
1034 that no optimization is turned on (normally it is -O2).
1035
1036 \subsection*{Solaris}
1037 \index[general]{Solaris }
1038 \addcontentsline{toc}{subsection}{Solaris}
1039
1040 To build Bacula from source, you will need the following installed on your
1041 system (they are not by default): libiconv, gcc 3.3.2, stdc++, libgcc (for
1042 stdc++ and gcc\_s libraries), make 3.8 or later. 
1043
1044 You will probably also need to: Add /usr/local/bin to PATH and Add
1045 /usr/ccs/bin to PATH for ar. 
1046
1047 \footnotesize
1048 \begin{verbatim}
1049 #!/bin/sh
1050 CFLAGS="-g" ./configure \
1051   --sbindir=$HOME/bacula/bin \
1052   --sysconfdir=$HOME/bacula/bin \
1053   --with-mysql=$HOME/mysql \
1054   --enable-smartalloc \
1055   --with-pid-dir=$HOME/bacula/bin/working \
1056   --with-subsys-dir=$HOME/bacula/bin/working \
1057   --with-working-dir=$HOME/bacula/working
1058 \end{verbatim}
1059 \normalsize
1060
1061 As mentioned above, the install process will create the sbindir and sysconfdir
1062 if they do not exist, but it will not automatically create the pid-dir,
1063 subsys-dir, or working-dir, so you must ensure that they exist before running
1064 Bacula for the first time.
1065
1066 Note, you may need to install the following packages to build Bacula
1067 from source:
1068 \footnotesize
1069 \begin{verbatim}
1070 SUNWbinutils,
1071 SUNWarc,
1072 SUNWhea,
1073 SUNWGcc,
1074 SUNWGnutls
1075 SUNWGnutls-devel
1076 SUNWGmake
1077 SUNWgccruntime
1078 SUNWlibgcrypt
1079 SUNWzlib
1080 SUNWzlibs
1081 SUNWbinutilsS
1082 SUNWGmakeS
1083 SUNWlibm
1084
1085 export 
1086 PATH=/usr/bin::/usr/ccs/bin:/etc:/usr/openwin/bin:/usr/local/bin:/usr/sfw/bin:/opt/sfw/bin:/usr/ucb:/usr/sbin
1087 \end{verbatim}
1088 \normalsize
1089
1090 \subsection*{FreeBSD}
1091 \index[general]{FreeBSD }
1092 \addcontentsline{toc}{subsection}{FreeBSD}
1093
1094 Please see: 
1095 \elink{The FreeBSD Diary}{http://www.freebsddiary.org/bacula.php} for a
1096 detailed description on how to make Bacula work on your system. In addition,
1097 users of FreeBSD prior to 4.9-STABLE dated Mon Dec 29 15:18:01 2003 UTC who
1098 plan to use tape devices, please see the 
1099 \ilink{Tape Testing Chapter}{FreeBSDTapes} of this manual for
1100 {\bf important} information on how to configure your tape drive for
1101 compatibility with Bacula. 
1102
1103 If you are using Bacula with MySQL, you should take care to compile MySQL with
1104 FreeBSD native threads rather than LinuxThreads, since Bacula is normally built
1105 with FreeBSD native threads rather than LinuxTreads. Mixing the two will
1106 probably not work. 
1107
1108 \subsection*{Win32}
1109 \index[general]{Win32 }
1110 \addcontentsline{toc}{subsection}{Win32}
1111
1112 To install the binary Win32 version of the File daemon please see the 
1113 \ilink{Win32 Installation Chapter}{_ChapterStart7} in this document. 
1114
1115 \subsection*{Windows Systems with CYGWIN Installed}
1116 \label{Win32}
1117 \index[general]{Windows Systems with CYGWIN Installed }
1118 \index[general]{Installed!Windows Systems with CYGWIN }
1119 \addcontentsline{toc}{subsection}{Windows Systems with CYGWIN Installed}
1120
1121 As of version 1.34, Bacula no longer uses CYGWIN for the Win32 File daemon.
1122 However, it is still built under a CYGWIN build environment -- though you
1123 can probably do it with VC Studio only.  If you wish to build the Win32
1124 File daemon from the source, you will need Microsoft C++ version 7.1.
1125 Details for building the Win32 FD are in the README.win32 file of the
1126 src/win32 directory.
1127
1128 Note, although most parts of Bacula build on Windows systems, the only part
1129 that we have tested and used is the File daemon. 
1130
1131 Finally, you should follow the installation instructions in the 
1132 \ilink{Win32 Installation}{_ChapterStart7} section of this document. 
1133
1134 \subsection*{Kern's Configure Script}
1135 \index[general]{Script!Kern's Configure }
1136 \index[general]{Kern's Configure Script }
1137 \addcontentsline{toc}{subsection}{Kern's Configure Script}
1138
1139 The script that I use for building on my "production" Linux machines is: 
1140
1141 \footnotesize
1142 \begin{verbatim}
1143 #!/bin/sh
1144 # This is Kern's configure script for Bacula
1145 CFLAGS="-g -Wall" \
1146   ./configure \
1147     --sbindir=$HOME/bacula/bin \
1148     --sysconfdir=$HOME/bacula/bin \
1149     --enable-smartalloc \
1150     --enable-gnome \
1151     --with-pid-dir=$HOME/bacula/bin/working \
1152     --with-subsys-dir=$HOME/bacula/bin/working \
1153     --with-mysql=$HOME/mysql \
1154     --with-working-dir=$HOME/bacula/bin/working \
1155     --with-dump-email=$USER \
1156     --with-smtp-host=mail.your-site.com \
1157     --with-baseport=9101
1158 exit 0
1159 \end{verbatim}
1160 \normalsize
1161
1162 Note that I define the base port as 9101, which means that Bacula will use
1163 port 9101 for the Director console, port 9102 for the File daemons, and port
1164 9103 for the Storage daemons. These ports should be available on all systems
1165 because they have been officially assigned to Bacula by IANA (Internet
1166 Assigned Numbers Authority). We strongly recommend that you use only these
1167 ports to prevent any conflicts with other programs. This is in fact the
1168 default if you do not specify a {\bf \verb:--:with-baseport} option. 
1169
1170 You may also want to put the following entries in your {\bf /etc/services}
1171 file as it will make viewing the connections made by Bacula easier to
1172 recognize (i.e. netstat -a): 
1173
1174 \footnotesize
1175 \begin{verbatim}
1176 bacula-dir      9101/tcp
1177 bacula-fd       9102/tcp
1178 bacula-sd       9103/tcp
1179 \end{verbatim}
1180 \normalsize
1181
1182 \subsection*{Installing Bacula}
1183 \index[general]{Bacula!Installing }
1184 \index[general]{Installing Bacula }
1185 \addcontentsline{toc}{subsection}{Installing Bacula}
1186
1187 Before setting up your configuration files, you will want to install Bacula in
1188 its final location. Simply enter: 
1189
1190 \footnotesize
1191 \begin{verbatim}
1192 make install
1193 \end{verbatim}
1194 \normalsize
1195
1196 If you have previously installed Bacula, the old binaries will be overwritten,
1197 but the old configuration files will remain unchanged, and the "new"
1198 configuration files will be appended with a {\bf .new}. Generally if you have
1199 previously installed and run Bacula you will want to discard or ignore the
1200 configuration files with the appended {\bf .new}. 
1201
1202 \subsection*{Building a File Daemon or Client}
1203 \index[general]{Client!Building a File Daemon or }
1204 \index[general]{Building a File Daemon or Client }
1205 \addcontentsline{toc}{subsection}{Building a File Daemon or Client}
1206
1207 If you run the Director and the Storage daemon on one machine and you wish to
1208 back up another machine, you must have a copy of the File daemon for that
1209 machine. If the machine and the Operating System are identical, you can simply
1210 copy the Bacula File daemon binary file {\bf bacula-fd} as well as its
1211 configuration file {\bf bacula-fd.conf} then modify the name and password in
1212 the conf file to be unique. Be sure to make corresponding additions to the
1213 Director's configuration file ({\bf bacula-dir.conf}). 
1214
1215 If the architecture or the O/S level are different, you will need to build a
1216 File daemon on the Client machine. To do so, you can use the same {\bf
1217 ./configure} command as you did for your main program, starting either from a
1218 fresh copy of the source tree, or using {\bf make\ distclean} before the {\bf
1219 ./configure}. 
1220
1221 Since the File daemon does not access the Catalog database, you can remove
1222 the {\bf \verb:--:with-mysql} or {\bf \verb:--:with-sqlite} options, then
1223 add {\bf \verb:--:enable-client-only}.  This will compile only the
1224 necessary libraries and the client programs and thus avoids the necessity
1225 of installing one or another of those database programs to build the File
1226 daemon.  With the above option, you simply enter {\bf make} and just the
1227 client will be built.
1228
1229 \label{autostart}
1230 \subsection*{Auto Starting the Daemons}
1231 \index[general]{Daemons!Auto Starting the }
1232 \index[general]{Auto Starting the Daemons }
1233 \addcontentsline{toc}{subsection}{Auto Starting the Daemons}
1234
1235 If you wish the daemons to be automatically started and stopped when your
1236 system is booted (a good idea), one more step is necessary. First, the
1237 ./configure process must recognize your system -- that is it must be a
1238 supported platform and not {\bf unknown}, then you must install the platform
1239 dependent files by doing: 
1240
1241 \footnotesize
1242 \begin{verbatim}
1243 (become root)
1244 make install-autostart
1245 \end{verbatim}
1246 \normalsize
1247
1248 Please note, that the auto-start feature is implemented only on systems
1249 that we officially support (currently, FreeBSD, RedHat/Fedora Linux, and
1250 Solaris), and has only been fully tested on Fedora Linux.
1251
1252 The {\bf make install-autostart} will cause the appropriate startup scripts
1253 to be installed with the necessary symbolic links.  On RedHat/Fedora Linux
1254 systems, these scripts reside in {\bf /etc/rc.d/init.d/bacula-dir} {\bf
1255 /etc/rc.d/init.d/bacula-fd}, and {\bf /etc/rc.d/init.d/bacula-sd}.  However
1256 the exact location depends on what operating system you are using.
1257
1258 If you only wish to install the File daemon, you may do so with: 
1259
1260 \footnotesize
1261 \begin{verbatim}
1262 make install-autostart-fd
1263 \end{verbatim}
1264 \normalsize
1265
1266 \subsection*{Other Make Notes}
1267 \index[general]{Notes!Other Make }
1268 \index[general]{Other Make Notes }
1269 \addcontentsline{toc}{subsection}{Other Make Notes}
1270
1271 To simply build a new executable in any directory, enter: 
1272
1273 \footnotesize
1274 \begin{verbatim}
1275 make
1276 \end{verbatim}
1277 \normalsize
1278
1279 To clean out all the objects and binaries (including the files named 1, 2, or
1280 3, which Kern uses as temporary files), enter: 
1281
1282 \footnotesize
1283 \begin{verbatim}
1284 make clean
1285 \end{verbatim}
1286 \normalsize
1287
1288 To really clean out everything for distribution, enter: 
1289
1290 \footnotesize
1291 \begin{verbatim}
1292 make distclean
1293 \end{verbatim}
1294 \normalsize
1295
1296 note, this cleans out the Makefiles and is normally done from the top level
1297 directory to prepare for distribution of the source. To recover from this
1298 state, you must redo the {\bf ./configure} in the top level directory, since
1299 all the Makefiles will be deleted. 
1300
1301 To add a new file in a subdirectory, edit the Makefile.in in that directory,
1302 then simply do a {\bf make}. In most cases, the make will rebuild the Makefile
1303 from the new Makefile.in. In some case, you may need to issue the {\bf make} a
1304 second time. In extreme cases, cd to the top level directory and enter: {\bf
1305 make Makefiles}. 
1306
1307 To add dependencies: 
1308
1309 \footnotesize
1310 \begin{verbatim}
1311 make depend
1312 \end{verbatim}
1313 \normalsize
1314
1315 The {\bf make depend} appends the header file dependencies for each of the
1316 object files to Makefile and Makefile.in. This command should be done in each
1317 directory where you change the dependencies. Normally, it only needs to be run
1318 when you add or delete source or header files. {\bf make depend} is normally
1319 automatically invoked during the configuration process. 
1320
1321 To install: 
1322
1323 \footnotesize
1324 \begin{verbatim}
1325 make install
1326 \end{verbatim}
1327 \normalsize
1328
1329 This not normally done if you are developing Bacula, but is used if you are
1330 going to run it to backup your system. 
1331
1332 After doing a {\bf make install} the following files will be installed on your
1333 system (more or less). The exact files and location (directory) for each file
1334 depends on your {\bf ./configure} command (e.g. gnome-console and
1335 gnome-console.conf are not installed if you do not configure GNOME. Also, if
1336 you are using SQLite instead of mysql, some of the files will be different). 
1337
1338 \footnotesize
1339 \begin{verbatim}
1340 bacula
1341 bacula-dir
1342 bacula-dir.conf
1343 bacula-fd
1344 bacula-fd.conf
1345 bacula-sd
1346 bacula-sd.conf
1347 bacula-tray-monitor
1348 tray-monitor.conf
1349 bextract
1350 bls
1351 bscan
1352 btape
1353 btraceback
1354 btraceback.gdb
1355 bconsole
1356 bconsole.conf
1357 create_mysql_database
1358 dbcheck
1359 delete_catalog_backup
1360 drop_bacula_tables
1361 drop_mysql_tables
1362 fd
1363 gnome-console
1364 gnome-console.conf
1365 make_bacula_tables
1366 make_catalog_backup
1367 make_mysql_tables
1368 mtx-changer
1369 query.sql
1370 bsmtp
1371 startmysql
1372 stopmysql
1373 wx-console
1374 wx-console.conf
1375 \end{verbatim}
1376 \normalsize
1377
1378 \label{monitor}
1379
1380 \subsection*{Installing Tray Monitor}
1381 \index[general]{Monitor!Installing Tray }
1382 \index[general]{Installing Tray Monitor }
1383 \addcontentsline{toc}{subsection}{Installing Tray Monitor}
1384
1385 The Tray Monitor is already installed if you used the {\bf
1386 \verb:--:enable-tray-monitor} configure option and ran {\bf make install}.
1387
1388 As you don't run your graphical environment as root (if you do, you should
1389 change that bad habit), don't forget to allow your user to read {\bf
1390 tray-monitor.conf}, and to execute {\bf bacula-tray-monitor} (this is not a
1391 security issue).
1392
1393 Then log into your graphical environment (KDE, Gnome or something else), run
1394 {\bf bacula-tray-monitor} as your user, and see if a cassette icon appears
1395 somewhere on the screen, usually on the task bar.
1396 If it doesn't, follow the instructions below related to your environment or
1397 window manager. 
1398
1399 \subsubsection*{GNOME}
1400 \index[general]{GNOME }
1401 \addcontentsline{toc}{subsubsection}{GNOME}
1402
1403 System tray, or notification area if you use the GNOME terminology, has been
1404 supported in GNOME since version 2.2. To activate it, right-click on one of
1405 your panels, open the menu {\bf Add to this Panel}, then {\bf Utility} and
1406 finally click on {\bf Notification Area}. 
1407
1408 \subsubsection*{KDE}
1409 \index[general]{KDE }
1410 \addcontentsline{toc}{subsubsection}{KDE}
1411
1412 System tray has been supported in KDE since version 3.1. To activate it,
1413 right-click on one of your panels, open the menu {\bf Add}, then {\bf Applet}
1414 and finally click on {\bf System Tray}. 
1415
1416 \subsubsection*{Other window managers}
1417 \index[general]{Managers!Other window }
1418 \index[general]{Other window managers }
1419 \addcontentsline{toc}{subsubsection}{Other window managers}
1420
1421 Read the documentation to know if the Freedesktop system tray standard is
1422 supported by your window manager, and if applicable, how to activate it. 
1423
1424 \subsection*{Modifying the Bacula Configuration Files}
1425 \index[general]{Modifying the Bacula Configuration Files }
1426 \index[general]{Files!Modifying the Bacula Configuration }
1427 \addcontentsline{toc}{subsection}{Modifying the Bacula Configuration Files}
1428
1429 See the chapter 
1430 \ilink{Configuring Bacula}{_ChapterStart16} in this manual for
1431 instructions on how to set Bacula configuration files.