Debian Codegraph @

manuals/en/misc/install.tex

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