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