]> git.sur5r.net Git - bacula/docs/blob - docs/manuals/en/main/pkg-install.tex
Add Screenshot section to Baculum chapter
[bacula/docs] / docs / manuals / en / main / pkg-install.tex
1 %%
2 %%
3
4 \chapter{Installing Bacula from Packages}
5 \label{PkgInstallChapter}
6 \index[general]{Bacula!Installing from Packages}
7 \index[general]{Installing Bacula from Packages}
8
9 In general, when you receive the Bacula Enterprise version,
10 you will receive it as prebuilt binaries in the packaging 
11 format that is most suited for your system. For example,
12 RedHat and SLES (SuSE) both use rpms, while Debian and Ubuntu
13 use debs.  Depending on the packaging system, you will receive
14 a different number of binary packages with different contents.
15
16 Below we explain how to manually install the packages on various
17 systems. You will need to adapt the version numbers to the
18 version you are actually using.  If you use one our package
19 repository, the commands you enter will much simpler and you
20 will not need to know version names or how to satisfy dependencies
21 on other packages that Bacula needs (e.g. postgresql) as they
22 will automatically handled by the package manager.
23
24 \section{Installing RPM Packages}
25 \index[general]{Installing RPM Packages}
26
27 In general, you should get the binary packages from your
28 download area on www.baculasystems.com.  You can either download
29 what you need or setup a repository pointing to the download
30 area that will allow you to use your installer program 
31 such as yum to ensure that all the dependencies a met.
32
33 \subsection{Installing Using Yum}
34 \index[general]{Installing Using Yum}
35
36 Create the file /etc/yum.repos.d/Bacula-Enterprise.repo which
37 should contain:
38
39 \begin{lstlisting}
40 [Bacula-Enterprise] 
41 name = Red Hat Enterprise - Bacula-Enterprise 
42 baseurl = https://www.baculasystems.com/dl/<xxxx>/rpms/bin/6.4.0/rhel6-64/ 
43 enabled = 1 
44 protect = 0 
45 gpgcheck = 0 
46
47 [Bacula-Enterprise-bweb] 
48 name = Red Hat Enterprise - BWeb Management Suite for BEE
49 baseurl = https://www.baculasystems.com/dl/<xxxx>/rpms/bweb/6.4.0/rhel6-64/ 
50 enabled = 1 
51 protect = 0 
52 gpgcheck = 0 
53
54 [Bacula-Enterprise-dag] 
55 name = Red Hat Enterprise - Bacula Systems dag for BWeb 
56 baseurl = https://www.baculasystems.com/dl/DAG/rhel6-64/ 
57 enabled = 1 
58 protect = 0 
59 gpgcheck = 0
60 \end{lstlisting}
61
62 Please replace the <xxxx> with the name of the last part 
63 your download area that was given to you in your Welcome Package.
64
65 Also please ensure that you adapt the Bacula version and
66 the architecture (platform) to correspond to your system.
67
68 If you have not previously installed the PostgreSQL server, do
69 so with:
70
71 \begin{lstlisting}
72 yum install postgresql-server
73 \end{lstlisting}
74
75 Then install the Bacula postgreSQL driver with:
76
77 \begin{lstlisting}
78 yum install bacula-enterprise-postgresql
79 \end{lstlisting}
80
81 If this is the first time you have installed the PostgreSQL
82 server, you will need to do the following:
83
84 \begin{lstlisting}
85 service postgresql initdb
86 chkconfig postgresql on
87 service postgresql restart
88 su postgres
89 /opt/bacula/scripts/create_postgresql_database
90 /opt/bacula/scripts/make_postgresql_tables
91 /opt/bacula/scripts/grant_postgresql_privileges
92 exit
93 service postgresql restart
94 /opt/bacula/scripts/bacula restart
95 \end{lstlisting}
96
97
98 If you want to install Bat, you will also want to do:
99
100 \begin{lstlisting}
101 \yum install bacula-enterprise-bat
102 \end{lstlisting}
103
104 If you wish to install BWeb, please ask for
105 the Bacula Enterprise White Paper for the BWeb
106 package.
107
108
109
110 \subsection{Manually Installing RPM Packages}
111 \index[general]{Manually Installing RPM Packages}
112 Please not that when installing by hand, we give you
113 general instructions below, but you must manually
114 adapt the version numbers (6.4.0 ...) and the release 
115 numbers (rh4, rh5, rh6, ...) to correspond to what
116 you are installing.
117
118 Assuming you will download the binaries to your machine,
119 first, transfer the binary packages you need to your
120 RedHat or SuSE machine. For example:
121
122 \begin{lstlisting}
123 bacula-enterprise-bat-6.4.0-1.rh6.x86_64.rpm
124 bacula-enterprise-client-6.4.0-1.rh6.x86_64.rpm
125 bacula-enterprise-libs-6.4.0-1.rh6.x86_64.rpm
126 \end{lstlisting}
127
128 and one or the other of the following two:
129 \begin{lstlisting}
130 bacula-enterprise-mysql-6.4.0-1.rh6.x86_64.rpm
131 bacula-enterprise-postgresql-6.4.0-1.rh6.x86_64.rpm
132 \end{lstlisting}
133
134 and if you are going to update the database:
135
136 \begin{lstlisting}
137 bacula-enterprise-updatedb-6.4.0-1.rh6.rpm
138 \end{lstlisting}
139
140 In addition, if you have any plugins, please download
141 the rpms for them.
142
143 To install generally if you have not previously installed
144 a Bacula Enterprise binary, you will want to save your old
145 configuration files somewhere and then remove the old packages
146 with:
147
148 \begin{lstlisting}
149 rpm -e <old-package-name> ...
150 \end{lstlisting}
151
152 If you have previously used a Bacula Enterprise binary, you 
153 do not need to remove the packages, you can simply install or
154 upgrade the new ones with:
155
156 \begin{lstlisting}
157 rpm -Uhv bacula-enterprise-bat-6.4.0-1.rh6.x86_64.rpm \
158 bacula-enterprise-client-6.4.0-1.rh6.x86_64.rpm \
159 bacula-enterprise-libs-6.4.0-1.rh6.x86_64.rpm \
160 ...
161 \end{lstlisting}
162
163 That is you can put them all on one line or multiple lines if terminated
164 with a backslash character (\verb+\+). There must be no space after the
165 backslash.
166
167 \section{Installing DEBs}
168 \index[general]{Installing BEBs}
169 In general, you should get the binary packages from your
170 download area on www.baculasystems.com.  You can either download
171 what you need or setup a repository pointing to the download
172 area that will allow you to use your installer program 
173 such as apt to ensure that all the dependencies a met.
174
175 \section{Installing Using apt}
176 \index[general]{Installing Using apt}
177 In order to use the Bacula Systems apt repository, you need to install
178 the HTTPS backend for APT.
179
180 \begin{lstlisting}
181   apt-get install apt-transport-https
182 \end{lstlisting}
183
184 Then, you need to download and install the gpg signature that validates packages
185
186 \begin{lstlisting}
187   wget https://www.baculasystems.com/dl/<xxx>/BaculaSystems-Public-Signature.asc
188   apt-key add BaculaSystems-Public-Signature.asc
189 \end{lstlisting}
190
191 Please replace the <xxxx> with the name of the last part 
192 your download area that was given to you in your Welcome Package.
193
194 Add to your /etc/apt/source.list file the following entries:
195
196 \begin{lstlisting}
197   # Bacula Enterprise
198   deb https://www.baculasystems.com/dl/<xxx>/debs/bin/6.4.0/squeeze-64/ squeeze main
199   # Bacula Enterprise Bweb Management Suite (if subscribed)
200   deb https://www.baculasystems.com/dl/<xxx>/debs/bweb/6.4.0/squeeze-64/ squeeze bweb
201 \end{lstlisting}
202
203
204 Also please ensure that you adapt the Bacula version and the architecture
205 (platform) to correspond to your system.
206
207 \begin{lstlisting}
208   debian 7     |  wheezy
209   debian 6     |  squeeze
210   debian 5     |  lenny
211   ubuntu 12.04 |  precise
212   ubuntu 10.04 |  lucid
213 \end{lstlisting}
214
215 Once done, you can update the repository list with the following command.
216
217 \begin{lstlisting}
218   apt-get update
219 \end{lstlisting}
220
221 If you have not previously install the PostgreSQL server, do
222 so with:
223
224 \begin{lstlisting}
225 apt-get install postgresql dbconfig-common
226 \end{lstlisting}
227
228 Then install the Bacula with postgreSQL driver with:
229
230 \begin{lstlisting}
231 apt-get install bacula-enterprise-postgresql
232 \end{lstlisting}
233
234 If you want to install Bat, you will also want to do:
235
236 \begin{lstlisting}
237 apt-get install bacula-enterprise-bat
238 \end{lstlisting}
239
240
241 \section{Manually Installing DEBs}
242 Assuming you will download the binaries to your machine,
243 first, transfer the binary packages you need to your
244 Debian or Ubuntu machine. For example:
245
246 \begin{lstlisting}
247 bacula-enterprise-client_6.4.0-1_amd64.deb
248 bacula-enterprise-common_6.4.0-1_amd64.deb
249 bacula-enterprise-console-qt_6.4.0-1_amd64.deb
250 bacula-enterprise-console_6.4.0-1_amd64.deb
251 \end{lstlisting}
252
253 and one of the following two:
254
255 \begin{lstlisting}
256 bacula-enterprise-mysql_6.4.0-1_amd64.deb
257 bacula-enterprise-postgresql_6.4.0-1_amd64.deb
258 \end{lstlisting}
259
260 In addition, if you have any plugins, please download
261 the debs for them.
262
263 To install generally if you have not previously installed
264 a Bacula Enterprise binary, you will want to save your old
265 configuration files somewhere and then remove the old packages
266 with:
267
268 \begin{lstlisting}
269 dpkg -r <old-package-name> ...
270 \end{lstlisting}
271
272 If you have previously used a Bacula Enterprise binary, you 
273 do not need to remove the packages, you can simply install or
274 upgrade the new ones with:
275
276 \begin{lstlisting}
277 dpkg -i bacula-enterprise-client_6.4.0-1_amd64.deb \
278   bacula-enterprise-common_6.4.0-1_amd64.deb       \
279   bacula-enterprise-console_6.4.0-1_amd64.deb      \
280   bacula-enterprise-postgresql_6.4.0-1_amd64.deb
281 \end{lstlisting}
282
283 That is you can put them all on one line or multiple lines if terminated
284 with a backslash character (\verb+\+). There must be no space after the
285 backslash.
286
287 If some dependencies are missing, you can install them automatically using:
288
289 \begin{lstlisting}
290   apt-get -f install
291 \end{lstlisting}
292
293 \section{Installing FreeBSD Packages}
294 \index[general]{Installing FreeBSD Packages}
295 First, transfer the binary packages you need including
296 the post-install scripts to your FreeBSD machine.  For
297 example:
298
299 \begin{lstlisting}
300   bacula-enterprise-fd.6.2.0.tbz
301   post-install.fd
302   bacula-enterprise-sfd.6.2.0.tbz
303   post-install.sfd
304   bacula-enterprise-sd-6.2.0.tbz
305   post-install.sd
306 \end{lstlisting}
307
308 Note, if you want only the FD or the SD, simply
309 skip the appropriate commands.
310
311 The package bacula-enterprise-fd was previously called
312 bacula-enterprise-client, so when upgrading, we recommend
313 that you save your prior bacula-fd.conf file, remove
314 the old package and install the new package.
315
316 The package bacula-enterprise-sfd is a static version
317 of the File daemon. We have not tested, but it should
318 work on virtually any version of FreeBSD. If you use
319 it, please let us know. Please note, if you install the
320 bacula-enterprise-fd package you will not need the
321 bacula-enterprise-sfd package and vise-versa.
322
323 Then as root execute the following:
324
325 \begin{lstlisting}
326   pkg_add bacula-enterprise-fd-6.2.0.tbz
327   ./post-install.fd
328   pkg_add bacula-enterprise-sd-6.2.0.tbz
329   ./post-install.sd
330 \end{lstlisting}
331
332 These need to be done only once.  The services
333 are not initially started, but the service scripts
334 will be installed.  
335
336 You must then edit the Bacula configuration scripts
337 that are in /opt/bacula/etc/bacula-fd.conf and
338 /opt/bacula/etc/bacula-sd.conf
339
340 You can then start the services with:
341
342 \begin{lstlisting}
343 service bacula_fd start
344 service bacula_sd start
345 \end{lstlisting}
346
347 They can be removed with:
348
349 \begin{lstlisting}
350   pkg_delete bacula-enterprise-fd-6.2.0
351   pkg_delete bacula-enterprise-sd-6.2.0
352 \end{lstlisting}
353
354 Note, the the client from version priort to 6.2.0 can
355 be removed with:
356
357 \begin{lstlisting}
358  pkg_delete bacula-enterprise-fd-<version -- e.g. 6.0.6>
359 \end{lstlisting}
360
361 The removal process may generate some error messages
362 concering missing files or the bacula user.  Generally
363 these can be ignored.
364
365 \section{Installing Solaris Sparc Packages}
366 \index[general]{Installing Solaris Sparc Packages}
367 Note: For Oracle Solaris 11 Intel 64 bit, please see the next section.
368
369 Please see below for how to install dependencies.
370
371 Our binaries come in tar.gz'ed version of a pkg directory.
372
373 The tar.gz are a tar of a directory which is compressed. 
374 It can either be decompressed with gunzip then detarred, or can be directly
375 be detarred with the GNU tar (gtar).
376
377 You can add packages with:
378 \begin{lstlisting}
379 pkgadd -d <dir> for a pkg dir
380 \end{lstlisting}
381
382 You can remove them with:
383 \begin{lstlisting}
384 pkgrm name
385 \end{lstlisting}
386
387 And you can get information about them with:
388 \begin{lstlisting}
389 pkginfo name
390 \end{lstlisting}
391
392 Remove all previous bacula packages.
393 \begin{lstlisting}
394    - # pkginfo | grep BEEbacula
395        application BEEbaculadir                     Bacula Enterprise Director
396        application BEEbaculafd                      Bacula Enterprise File Daemon
397        application BEEbaculalibs                    Bacula Enterprise Shared Libs
398        application BEEbaculasd                      Bacula Enterprise Storage Daemon
399        application BEEbaculasql                     Bacula Enterprise SQL Libraries
400    - # pkgrm BEEbaculadir BEEbaculasd BEEbaculafd BEEbaculasql BEEbaculalibs
401 \end{lstlisting}
402
403 Install the new packages as needed (if not already installed).
404
405   cd to the place where are the packages, untar them :
406
407 \begin{lstlisting}
408   tar -zxf  bacula-enterprise-libs-6.2.1.i86.sol11.pkg.tar.gz
409   tar -zxf  bacula-enterprise-sql-6.2.1.i86.sol11.pkg.tar.gz
410   tar -zxf  bacula-enterprise-dir-6.2.1.i86.sol11.pkg.tar.gz
411   tar -zxf  bacula-enterprise-fd-6.2.1.i86.sol11.pkg.tar.gz
412   tar -zxf  bacula-enterprise-sd-6.2.1.i86.sol11.pkg.tar.gz
413 \end{lstlisting}
414
415 Install them using pkgadd :
416
417 \begin{lstlisting}
418    - For a File Daemon
419       - # pkgadd -d  . BEEbaculalibs
420       - # pkgadd -d  . BEEbaculafd
421    - For a Storage Daemon
422       - # pkgadd -d . BEEbaculalibs
423       - # pkgadd -d . BEEbaculasql BEEbaculasd
424    - For a Director
425       - # pkgadd -d . BEEbaculalibs
426       - # pkgadd -d . BEEbaculasql BEEbaculadir
427 \end{lstlisting}
428
429 (When installing multiple daemons on one server only install the package once.
430  You can always use pkginfo | grep BEE to see what packages are installed.)
431
432 Setup PostgreSQL on Solaris
433 \begin{lstlisting}
434    - Change to user postgres
435       - # su - postgres
436    - Initialize the database
437       - # /usr/postgres/9.2/bin/initdb -D /var/postgres/9.2/data
438    - Edit /var/postgres/9.2/data/postgresql.conf
439           /var/postgres/9.2/data/pg_hba.conf
440           /var/postgres/9.2/data/pg_ident.conf
441    - Logout as postgres user
442       - # exit
443    - Enable the SMF service
444       - # svcadm enable svc:/application/database/postgresql:default
445 \end{lstlisting}
446
447 Setup bacula-fd on Solaris
448 \begin{lstlisting}
449    - Edit /etc/opt/bacula/bacula-fd.conf
450    - Enable the SMF service (either choose the readonly instance or default one)
451       - # svcadm enable svc:/application/backup/bacula-fd:default
452       - # svcadm enable svc:/application/backup/bacula-fd:readonly
453    (The readonly instance only allows the fd to perform backups no restores and
454     runs a a non-priviledged user. The default instance runs as root and allows
455     all operations.)
456 \end{lstlisting}
457
458 Setup bacula-sd on Solaris
459 \begin{lstlisting}
460    - Edit /etc/opt/bacula/bacula-sd.conf
461    - Make sure all tape drives are accessable as user bacula group bacula
462    - Test your configuration
463       - # su - bacula -c '/opt/bacula/bin/amd64/bacula-sd -t'
464    - Enable the SMF service
465       - # svcadm enable svc:/application/backup/bacula-sd:default
466 \end{lstlisting}
467
468 Setup bacula-dir on Solaris
469 \begin{lstlisting}
470    - Make sure the database schema is loaded.
471       - When you run the database on the same instance as the dir you can perform
472         the following steps:
473          - # su - postgres
474          - # /opt/bacula/scripts/create_bacula_database
475          - # /opt/bacula/scripts/make_bacula_tables
476          - # /opt/bacula/scripts/grant_bacula_privileges
477       - Logout as postgres user
478          - # exit
479    - Test your configuration
480       - # su - bacula -c '/opt/bacula/bin/amd64/bacula-dir -t'
481    - Enable the SMF service
482       - # svcadm enable svc:/application/backup/bacula-dir:default
483 \end{lstlisting}
484
485 \subsection{Installing Solaris Sparc Dependencies}
486 How to install dependencies for Solaris from CSW (if needed)
487
488 To install Solaris package with pkg-get, you can use
489 \begin{lstlisting}
490  pkgadd -d http://get.opencsw.org/now
491
492  http://www.opencsw.org/get-it/
493 \end{lstlisting}
494
495 Detailed instructions are available on
496 \begin{lstlisting}
497 http://www.opencsw.org/manual/for-administrators/getting-started.html
498 \end{lstlisting}
499
500 For a list of available packages use:
501 \begin{lstlisting}
502 /opt/csw/bin/pkgutil -l
503 \end{lstlisting}
504
505 To install a package, just use the following command
506 \begin{lstlisting}
507 /opt/csw/bin/pkgutil -y -i <package name>
508 \end{lstlisting}
509
510 Bacula packages on Solaris 11 depend on :
511
512 \begin{lstlisting}
513 - CSWpython
514 - CSWopenssl
515 - CSWlibfbopenssl0
516 - CSWreadline
517 \end{lstlisting}
518
519 \subsection{How to install Postgresql}
520
521 * You can get an excellent PostgreSQL distribution for Solaris directly
522 on http://www.postgresql.org
523
524 For example, the version 9.2 can be downloaded for Solaris 32/64 Intel:
525 \begin{lstlisting}
526 http://www.postgresql.org/ftp/binary/v9.2.0/solaris/solaris11/i386/
527 \end{lstlisting}
528
529 You may have to make the libpq available for Bacula, for that, just
530 create a symlink to the libpq.so object in a standard library path.
531
532 \begin{lstlisting}
533 ln -s /usr/postgres/9.2/lib/64/libpq.so /opt/bacula/lib/amd64/
534 ln -s /usr/postgres/9.2/lib/libpq.so /opt/bacula/lib/
535 \end{lstlisting}
536
537 * You can get PostgreSQL from opencsw but Postgres 9.2 is not available
538 in OpenCSW repository.
539
540 The latest version available in OpenCSW is Postgres 9.1.
541
542 \section{Installing Intel Solaris 10 Packages}
543 \index[general]{Installing Intel Solaris 10 Packages}
544 The installation of Intel Solaris 10 packages is very similar
545 to how it is done on Solaris Sparc.
546         
547 Our are in pkg format : 
548
549 Our repository contain tar.gz'ed version of the pkg
550
551 The tar.gz are a tar of a directory which is compressed. 
552 It can either be decompressed with gunzip then detarred, or can be directly
553 be detarred with the GNU tar (gtar).
554
555 You can add packages with:
556 \begin{lstlisting}
557 pkgadd -d <dir> for a pkg dir
558 \end{lstlisting}
559
560 You can remove them with:
561 \begin{lstlisting}
562 pkgrm name
563 \end{lstlisting}
564
565 And you can get information about them with:
566 \begin{lstlisting}
567 pkginfo name
568 \end{lstlisting}
569
570 Remove all previous bacula packages.
571 \begin{lstlisting}
572    - # pkginfo | grep BEEbacula
573        application BEEbaculadir                     Bacula Enterprise Director
574        application BEEbaculafd                      Bacula Enterprise File Daemon
575        application BEEbaculalibs                    Bacula Enterprise Shared Libs
576        application BEEbaculasd                      Bacula Enterprise Storage Daemon
577        application BEEbaculasql                     Bacula Enterprise SQL files
578    - # pkgrm BEEbaculadir BEEbaculasd BEEbaculafd BEEbaculasql BEEbaculalibs
579 \end{lstlisting}
580
581 Install the new packages as needed (if not already installed).
582
583   cd to the place where are the packages, untar them :
584
585 \begin{lstlisting}
586   gtar -zxf  bacula-enterprise-libs-6.2.1.i86.sol10.pkg.tar.gz
587   gtar -zxf  bacula-enterprise-sql-6.2.1.i86.sol10.pkg.tar.gz
588   gtar -zxf  bacula-enterprise-dir-6.2.1.i86.sol10.pkg.tar.gz
589   gtar -zxf  bacula-enterprise-fd-6.2.1.i86.sol10.pkg.tar.gz
590   gtar -zxf  bacula-enterprise-sd-6.2.1.i86.sol10.pkg.tar.gz
591 \end{lstlisting}
592
593 Install them using pkgadd :
594
595 There is ownership conflict during the install, continue the install and follow
596   the instruction below to correct them
597 \begin{lstlisting}
598    - For a File Daemon
599       - # pkgadd -d  . BEEbaculalibs
600       - # pkgadd -d  . BEEbaculafd
601    - For a Storage Daemon
602       - # pkgadd -d . BEEbaculalibs
603       - # pkgadd -d . BEEbaculasd
604    - For a Director
605       - # pkgadd -d . BEEbaculalibs
606       - # pkgadd -d . BEEbaculasql BEEbaculadir
607 \end{lstlisting}
608
609 (When installing multiple daemons on one server only install the package once.
610  You can always use pkginfo | grep BEE to see what packages are installed.)
611
612 The postgresql that we have use is the 9.1 from CSW repository (read the howto 
613 at  the end of the file)
614
615 \begin{lstlisting}
616    - pkgadd -d http://get.opencsw.org/now
617    - pkgutil -y -i postgresql91
618    - The bacula user need to be able to run pg_dump set the path to do so
619      We used the /etc/rpfile in our case ba adding :
620      export PATH=$PATH:/opt/csw/bin
621      set a link from /opt/csw/bin/pg_dump91 to /opt/csw/bin/pg_dump
622 \end{lstlisting}
623
624 Setup bacula-fd on Solaris
625 \begin{lstlisting}
626    - Edit /etc/opt/bacula/bacula-fd.conf
627    - Enable the SMF service (either choose the readonly instance or default one)
628       - # svcadm enable svc:/application/backup/bacula-fd:default
629       - # svcadm enable svc:/application/backup/bacula-fd:readonly
630    (The readonly instance only allows the fd to perform backups no restores and
631     runs a a non-priviledged user. The default instance runs as root and allows
632     all operations.)
633 \end{lstlisting}
634
635 Setup bacula-sd on Solaris
636 \begin{lstlisting}
637    - Edit /etc/opt/bacula/bacula-sd.conf
638    - Make sure all tape drives are accessable as user bacula group bacula
639    - set ownership to bacula on chown bacula:bacula /opt/bacula/archive/
640    - set ownership to bacula on chown bacula:bacula /opt/bacula/var/run
641    - Test your configuration
642       - # su - bacula -c '/opt/bacula/bin/amd64/bacula-sd -t'
643    - Enable the SMF service
644       - # svcadm enable svc:/application/backup/bacula-sd:default
645 \end{lstlisting}
646       
647 Setup bacula-dir on Solaris 
648 \begin{lstlisting}
649    - Make sure the database schema is loaded.
650       - When you run the database on the same instance as the dir you can perform
651         the following steps:
652          - # su - postgres
653          - # /opt/bacula/scripts/create_bacula_database
654          - # /opt/bacula/scripts/make_bacula_tables
655          - # /opt/bacula/scripts/grant_bacula_privileges
656       - Logout as postgres user
657          - # exit
658    - Make postgres libs management :    
659          - # ln -s /opt/csw/lib/64/libpq.so /opt/bacula/lib/amd64/
660          - # ln -s /opt/csw//lib/libpq.so /opt/bacula/lib/
661    - set ownership to bacula for /opt/bacula/var/run and /opt/bacula/archive
662      /opt/bacula/working
663         - # chown bacula:bacula /opt/bacula/var/run /opt/bacula/archive /opt/bacula/working
664
665    - Test your configuration
666       - # su - bacula -c '/opt/bacula/bin/amd64/bacula-dir -t'
667    - Enable the SMF service
668       - # svcadm enable svc:/application/backup/bacula-dir:default
669 \end{lstlisting}
670
671 \subsection{Installing Dependencies from CSW}
672 How to install dependencies for Solaris from CSW (if needed)
673
674 To install Solaris package with pkg-get, you can use
675 \begin{lstlisting}
676  pkgadd -d http://get.opencsw.org/now
677
678  http://www.opencsw.org/get-it/
679 \end{lstlisting}
680
681 Detailed instructions are available on
682 \begin{lstlisting}
683 http://www.opencsw.org/manual/for-administrators/getting-started.html
684 \end{lstlisting}
685
686 For a list of available packages use:
687 \begin{lstlisting}
688 /opt/csw/bin/pkgutil -l
689 \end{lstlisting}
690
691 To install a package, just use the following command
692 \begin{lstlisting}
693 /opt/csw/bin/pkgutil -y -i <package name>
694 \end{lstlisting}
695
696 Bacula packages on Solaris 10 depend on:
697
698 \begin{lstlisting}
699 - CSWpython
700 - CSWopenssl
701 - CSWlibfbopenssl0
702 - CSWreadline
703 - CSWPostgresql91
704 \end{lstlisting}
705
706 \subsection{How to install PostgreSQL}
707 How to install Postgresql from Postgressql website (9.2 in not available in CSW)
708
709 You can get an excellent PostgreSQL distribution for Solaris directly
710 on http://www.postgresql.org
711
712 For example, the version 9.2 can be downloaded for Solaris 32/64 Intel:
713 \begin{lstlisting}
714 http://www.postgresql.org/ftp/binary/v9.2.0/solaris/solaris10/i386/
715 \end{lstlisting}
716
717 You may have to make the libpq available for Bacula, for that, just
718 create a symlink to the libpq.so object in a standard library path.
719
720 \begin{lstlisting}
721 ln -s /usr/postgres/9.2/lib/64/libpq.so /opt/bacula/lib/amd64/
722 ln -s /usr/postgres/9.2/lib/libpq.so /opt/bacula/lib/
723 \end{lstlisting}
724
725 \section{Installing Intel Solaris 11 Packages}
726 \index[general]{Installing Intel Solaris 11 Packages}
727 Please see below for how to install dependencies.
728
729 Our binaries come as tar.gz'ed version of a pkg directory
730
731 The tar.gz are a tar of a directory which is compressed. 
732 It can either be decompressed with gunzip then detarred, or can be directly
733 be detarred with the GNU tar (gtar).
734
735 You can add packages with:
736 \begin{lstlisting}
737 pkgadd -d <dir> for a pkg dir
738 \end{lstlisting}
739
740 You can remove them with:
741 \begin{lstlisting}
742 pkgrm name
743 \end{lstlisting}
744
745 And you can get information about them with:
746 \begin{lstlisting}
747 pkginfo name
748 \end{lstlisting}
749
750 Remove all previous bacula packages.
751 \begin{lstlisting}
752    - # pkginfo | grep BEEbacula
753        application BEEbaculadir                     Bacula Enterprise Director
754        application BEEbaculafd                      Bacula Enterprise File Daemon
755        application BEEbaculalibs                    Bacula Enterprise Shared Libs
756        application BEEbaculasd                      Bacula Enterprise Storage Daemon
757        application BEEbaculasql                     Bacula Enterprise SQL Libraries
758    - # pkgrm BEEbaculadir BEEbaculasd BEEbaculafd BEEbaculasql BEEbaculalibs
759 \end{lstlisting}
760
761 Install the new packages as needed (if not already installed).
762
763   cd to the place where are the packages, untar them :
764
765 \begin{lstlisting}
766   tar -zxf  bacula-enterprise-libs-6.2.1.i86.sol11.pkg.tar.gz
767   tar -zxf  bacula-enterprise-sql-6.2.1.i86.sol11.pkg.tar.gz
768   tar -zxf  bacula-enterprise-dir-6.2.1.i86.sol11.pkg.tar.gz
769   tar -zxf  bacula-enterprise-fd-6.2.1.i86.sol11.pkg.tar.gz
770   tar -zxf  bacula-enterprise-sd-6.2.1.i86.sol11.pkg.tar.gz
771 \end{lstlisting}
772
773 Install them using pkgadd :
774
775 \begin{lstlisting}
776    - For a File Daemon
777       - # pkgadd -d  . BEEbaculalibs
778       - # pkgadd -d  . BEEbaculafd
779    - For a Storage Daemon
780       - # pkgadd -d . BEEbaculalibs
781       - # pkgadd -d . BEEbaculasql BEEbaculasd
782    - For a Director
783       - # pkgadd -d . BEEbaculalibs
784       - # pkgadd -d . BEEbaculasql BEEbaculadir
785 \end{lstlisting}
786
787 (When installing multiple daemons on one server only install the package once.
788  You can always use pkginfo | grep BEE to see what packages are installed.)
789
790 Setup postgresql on Solaris
791 \begin{lstlisting}
792    - Change to user postgres
793       - # su - postgres
794    - Initialize the database
795       - # /usr/postgres/9.2/bin/initdb -D /var/postgres/9.2/data
796    - Edit /var/postgres/9.2/data/postgresql.conf
797           /var/postgres/9.2/data/pg_hba.conf
798           /var/postgres/9.2/data/pg_ident.conf
799    - Logout as postgres user
800       - # exit
801    - Enable the SMF service
802       - # svcadm enable svc:/application/database/postgresql:default
803 \end{lstlisting}
804
805 Setup bacula-fd on Solaris
806 \begin{lstlisting}
807    - Edit /etc/opt/bacula/bacula-fd.conf
808    - Enable the SMF service (either choose the readonly instance or default one)
809       - # svcadm enable svc:/application/backup/bacula-fd:default
810       - # svcadm enable svc:/application/backup/bacula-fd:readonly
811    (The readonly instance only allows the fd to perform backups no restores and
812     runs a a non-priviledged user. The default instance runs as root and allows
813     all operations.)
814 \end{lstlisting}
815
816 Setup bacula-sd on Solaris
817 \begin{lstlisting}
818    - Edit /etc/opt/bacula/bacula-sd.conf
819    - Make sure all tape drives are accessable as user bacula group bacula
820    - Test your configuration
821       - # su - bacula -c '/opt/bacula/bin/amd64/bacula-sd -t'
822    - Enable the SMF service
823       - # svcadm enable svc:/application/backup/bacula-sd:default
824 \end{lstlisting}
825
826 Setup bacula-dir on Solaris
827 \begin{lstlisting}
828    - Make sure the database schema is loaded.
829       - When you run the database on the same instance as the dir you can perform
830         the following steps:
831          - # su - postgres
832          - # /opt/bacula/scripts/create_bacula_database
833          - # /opt/bacula/scripts/make_bacula_tables
834          - # /opt/bacula/scripts/grant_bacula_privileges
835       - Logout as postgres user
836          - # exit
837    - Test your configuration
838       - # su - bacula -c '/opt/bacula/bin/amd64/bacula-dir -t'
839    - Enable the SMF service
840       - # svcadm enable svc:/application/backup/bacula-dir:default
841 \end{lstlisting}
842
843 \subsection{Installing Dependencies}
844 How to install dependencies for Solaris from CSW (if needed)
845
846 To install Solaris package with pkg-get, you can use
847 \begin{lstlisting}
848  pkgadd -d http://get.opencsw.org/now
849
850  http://www.opencsw.org/get-it/
851 \end{lstlisting}
852
853 Detailed instructions are available on
854 \begin{lstlisting}
855 http://www.opencsw.org/manual/for-administrators/getting-started.html
856 \end{lstlisting}
857
858 For a list of available packages use:
859 \begin{lstlisting}
860 /opt/csw/bin/pkgutil -l
861 \end{lstlisting}
862
863 To install a package, just use the following command
864 \begin{lstlisting}
865 /opt/csw/bin/pkgutil -y -i <package name>
866 \end{lstlisting}
867
868 Bacula packages on Solaris 11 depend on:
869
870 \begin{lstlisting}
871 - CSWpython
872 - CSWopenssl
873 - CSWlibfbopenssl0
874 - CSWreadline
875 \end{lstlisting}
876
877 \subsection{How to install Postgresql}
878 You can get an excellent PostgreSQL distribution for Solaris directly
879 on http://www.postgresql.org
880
881 For example, the version 9.2 can be downloaded for Solaris 32/64 Intel:
882 \begin{lstlisting}
883 http://www.postgresql.org/ftp/binary/v9.2.0/solaris/solaris11/i386/
884 \end{lstlisting}
885
886 You may have to make the libpq available for Bacula, for that, just
887 create a symlink to the libpq.so object in a standard library path.
888
889 \begin{lstlisting}
890 ln -s /usr/postgres/9.2/lib/64/libpq.so /opt/bacula/lib/amd64/
891 ln -s /usr/postgres/9.2/lib/libpq.so /opt/bacula/lib/
892 \end{lstlisting}
893
894 \section{Upgrading Bacula}\label{upgrading1}
895 \index[general]{Bacula!Upgrading}
896 \index[general]{Upgrading Bacula}
897 \index[general]{Upgrading}
898
899 If you are upgrading from one Bacula version to another, you should first
900 carefully read the ReleaseNotes of all major versions between your current
901 version and the version to which you are upgrading.  In many upgrades,
902 especially for minor patch upgrades (e.g. between 6.4.0 and 6.4.1) there
903 will be no database upgrade, and hence the process is rather simple.
904
905 You {\bf must} ensure that on any given machine that all components of
906 Bacula are running on exactly the same version.  This is because they
907 use shared libraries which are specific to each version, so having
908 different Bacula versions of the various daemons will not work unless
909 you have multiple libraries installed.
910
911 As always, we attempt to support older File daemons. This avoids the
912 need to do a simultaneous upgrade of many machines. For exactly which
913 older versions of the FD are supported, please see the ReleaseNotes
914 for the new version.  In any case, you must always upgrade both the
915 Director and the Storage daemon at the same time, and you must also
916 upgrade any File daemon that is running on the same machine as a Director
917 or a Storage daemon (see the prior paragraph).
918
919 If the Bacula catalog database has been upgraded (as it is almost every
920 major release), you will either need to reinitialize your database starting
921 from scratch (not normally a good idea), or save an ASCII copy of your
922 database, then proceed to upgrade it.  If you are upgrading two major
923 versions (e.g.  3.0.x to 5.0.0) then life will be more complicated because
924 you must do two database upgrades.  See below for more on this.
925
926 Upgrading the catalog is usually done by the package when
927 you are upgrading Bacula. However, there may be cases where
928 you must or you want to upgrade manually.
929
930 The manual process of upgrading the catalog is:
931
932 \begin{lstlisting}
933 cd <installed-scripts-dir> (default /etc/bacula)
934 ./update_bacula_tables
935 \end{lstlisting}
936
937 This update script can also be find in the Bacula source src/cats
938 directory.
939
940 If there are several database upgrades between your version and the
941 version to which you are upgrading, you will need to apply each database
942 upgrade script. For your convenience, you can find all the old upgrade scripts
943 in the {\bf upgradedb} directory of the source code. You will need to edit the
944 scripts to correspond to your system configuration. The final upgrade script,
945 if any, can be applied as noted above.
946
947 If you are upgrading from one major version to another, you will need to
948 replace all your components at the same time as generally the inter-daemon
949 protocol will change. However, within any particular release (e.g. version
950 1.32.x) unless there is an oversight or bug, the daemon protocol will not
951 change. If this is confusing, simply read the ReleaseNotes very carefully as
952 they will note if all daemons must be upgraded at the same time.
953
954 Finally, please note that in general it is not necessary or desirable
955 to do a {\bf make uninstall} before doing an upgrade providing you are careful
956 not to change the installation directories. In fact, if you do so, you will
957 most likely delete all your conf files, which could be disastrous.
958 The normal procedure during an upgrade is simply:
959
960 \begin{lstlisting}
961 ./configure (your options)
962 make
963 make install
964 \end{lstlisting}
965
966 In general none of your existing .conf or .sql files will be overwritten,
967 and you must do both the {\bf make} and {\bf make install}  commands, a
968 {\bf make install} without the preceding {\bf make} will not work.
969
970 For additional information on upgrading, please see the \bsysxrlink{Upgrading Bacula Versions}{upgrading}{problems}{section} of the \problemsman{}.
971
972 \section{Releases Numbering}
973 \index[general]{Release Numbering}
974 \index[general]{Version Numbering}
975 Every Bacula release whether beta or production has a different number
976 as well as the date of the release build. The numbering system follows
977 traditional Open Source conventions in that it is of the form.
978
979 \begin{lstlisting}
980 major.minor.release
981 \end{lstlisting}
982
983 For example:
984 \begin{lstlisting}
985 1.38.11
986 \end{lstlisting}
987
988 where each component (major, minor, patch) is a number.
989 The major number is currently 1 and normally does not change
990 very frequently.  The minor number starts at 0 and increases
991 each for each production release by 2 (i.e. it is always an
992 even number for a production release), and the patch number is
993 starts at zero each time the minor number changes.  The patch
994 number is increased each time a bug fix (or fixes) is released
995 to production.
996
997 So, if your current production Bacula release is version 5.2.10.  If there
998 are bug fixes, the next minor release will be 5.2.11 (i.e.  the patch number has
999 increased by one).
1000
1001 For all patch releases where the minor version number does not change,
1002 the database and all the daemons will be compatible.  That means that
1003 you can safely run a 5.2.1 Director with a 5.2.10 Client providing
1004 it is on a different machine.  Of course,
1005 in this case, the Director may have bugs that are not fixed. Generally,
1006 within a minor release (some minor releases are not so minor), all
1007 patch numbers are officially released to production. This means that if
1008 the current Bacula version is 5.2.11, versions 5.2.0, 5.2.1, ... 5.2.10
1009 have all been previously released.
1010
1011 When the minor number is odd, it indicates that the package is under
1012 development and thus may not be stable. For example, if the current
1013 production release of Bacula is currently 5.2.11, the current development
1014 version is 5.3.22. All patch versions of the development code are
1015 available in the git source repository.  However, not all patch versions
1016 of the development code (odd minor version) are officially released. When
1017 they are released, they are released as beta versions (see below for a
1018 definition of what beta means for Bacula releases).
1019
1020 In general when the minor number increases from one production release
1021 to the next (i.e. 1.38.x to 1.40.0), the catalog database must be upgraded,
1022 the Director and Storage daemon must always be on the same minor release
1023 number, and often (not always), the Clients must also be on the same minor
1024 release. As often as possible, we attempt to make new releases that are
1025 downwards compatible with prior clients, but this is not always possible.
1026 You must check the release notes.  In general, you will have fewer problems
1027 if you always run all the components on the same minor version number (i.e.
1028 all either 1.38.x or 1.40.x but not mixed).
1029
1030
1031 \label{BetaReleases}
1032 \section*{Beta Releases}
1033 \index[general]{Beta Releases}
1034 Towards the end of the development cycle, which typically runs
1035 one year from a major release to another, there will be several beta
1036 releases of the development code prior to a production release.
1037 As noted above, beta versions always have odd minor version numbers
1038 (e.g 1.37.x or 1.39.x).
1039 The purpose of the beta releases is to allow early adopter users to test
1040 the new code.  Beta releases are made with the following considerations:
1041
1042 \begin{bsysitemize}
1043 \item The code passes the regression testing on FreeBSD, Linux, and Solaris
1044   machines.
1045
1046 \item There are no known major bugs, or on the rare occasion that
1047   there are, they will be documented or already in the bugs database.
1048
1049 \item Some of the new code/features may not yet be tested.
1050
1051 \item Bugs are expected to be found, especially in the new
1052   code before the final production release.
1053
1054 \item The code will have been run in production in at least one small
1055   site (mine).
1056
1057 \item The Win32 client will have been run in production at least
1058   one night at that small site.
1059
1060 \item The documentation in the manual is unlikely to be complete especially
1061   for the new features, and the Release Notes may not be fully
1062   organized.
1063
1064 \item Beta code is not generally recommended for everyone, but
1065   rather for early adopters.
1066 \end{bsysitemize}
1067
1068
1069 \section{Supported Operating Systems}
1070 \label{Systems}
1071 \index[general]{Systems!Supported Operating}
1072 \index[general]{Supported Operating Systems}
1073
1074 Please see the
1075  \ilink{Supported Operating Systems}{SupportedOSes} section
1076 of the QuickStart chapter of this manual.
1077
1078 \section{What Database to Use?}
1079 \label{DB}
1080 \index[general]{What Database to Use?}
1081 \index[general]{Use!What Database to}
1082
1083 Before installing Bacula you need to decide if you want to use
1084 MySQL or PostgreSQL. Note, the community version of Bacula supports
1085 SQLite, but for the Enterprise version, we support only MySQL and
1086 PostgreSQL
1087
1088 If you wish to use MySQL as the Bacula catalog, please see the
1089  \ilink{Installing and Configuring MySQL}{MySqlChapter} chapter of this
1090 manual. You will need to install MySQL prior to continuing with the
1091 configuration of Bacula. MySQL is a high quality database that is very
1092 efficient and is suitable for small and medium sized installation (up to
1093 2,000,000 files per job). It is slightly more complicated than SQLite to setup
1094 and administer because it has a number of sophisticated features such as
1095 userids and passwords. It runs as a separate process, is truly professional and
1096 can manage a database of any size.
1097
1098 If you wish to use PostgreSQL as the Bacula catalog, please see the
1099  \ilink{Installing and Configuring PostgreSQL}{PostgreSqlChapter} chapter of
1100 this manual.  You will need to install PostgreSQL prior to continuing with
1101 the configuration of Bacula.  PostgreSQL is very similar to MySQL, though
1102 it tends to be slightly more SQL92 compliant and has many more advanced
1103 features such as transactions, stored procedures, and the such.  It
1104 requires a certain knowledge to install and maintain.  PostgreSQL is
1105 suitable for any sized installation (some sites have much more than 1
1106 billion objects in the Catalog).  Bacula uses many optimized PostgreSQL
1107 functions, and can run more than 10 time faster on jobs having millions of
1108 files than MySQL (Specially in during restore, accurate mode, bvfs queries
1109 and when the database server is not on the same host than the Director).
1110 It's possible to switch from MySQL/SQLite to PostgreSQL, but it requires
1111 some DBA knowledge.