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