Imported Upstream version 2.5.1p3
[debian/amanda] / docs / install.txt
1
2 Chapter 2. Amanda Installation Notes
3 Prev  Part I. Installation      Next
4
5 -------------------------------------------------------------------------------
6
7 Chapter 2. Amanda Installation Notes
8
9
10 James da Silva
11
12 Original text
13 AMANDA Core Team
14 <jds@amanda.org>
15
16 Stefan G. Weichinger
17
18 XML-conversion, Updates
19 AMANDA Core Team
20 <sgw@amanda.org>
21 Table of Contents
22
23
24   Before_doing_anything
25
26   Compiling_the_Amanda_sources
27
28   Setting_up_your_Amanda_Configuration
29
30
31         Setting_up_the_Tape_Server_Host
32
33         Set_up_the_Backup_Client_Hosts
34
35
36
37 Note
38
39 Refer to http://www.amanda.org/docs/install.html for the current version of
40 this document.
41 This document covers the compilation, installation, and runtime setup of Amanda
42 2.4.2 and higher.
43
44  Before doing anything
45
46
47 * Read this document all the way through.
48 * Consult Amanda_2.4.x_-_System-Specific_Installation_Notes for installation
49   notes specific to particular operating systems. There is often important
50   information there, so don't forget this step.
51 * Read Upgrade_Issues if you are upgrading from a previous Amanda version.
52   There are some issues that you will need to be aware of.
53 * If you are using KERBEROS authentication, read Kerberos for details on
54   installing and running the kerberized version of Amanda.
55 * Check the Amanda Patches Page, http://www.amanda.org/patches/.
56
57
58  Compiling the Amanda sources
59
60 If you have multiple architectures, you only need to install the whole Amanda
61 package on the tape server host (the one with tape drive). On the backup client
62 hosts (the ones you are going to dump), you only need to compile some of the
63 Amanda programs (see section Set_up_the_Backup_Client_Hosts below).
64
65  Source configuration
66
67
68 * Amanda can optionally make use of the following packages to back up different
69   types of clients or clients with different filesystem dumping programs.
70
71   o GNU-tar:
72     If you wish to use GNU-tar to back up filesystems, it is recommended to use
73     GNU-tar 1.13.25. Plain GNU-tar 1.12 needs to be patched to handle large
74     files (> 2GB). Plain GNU-tar 1.13 creates bad index-lists which amrecover
75     cannot handle, as does the rarely used GNU-tar 1.13.9x, which changed the
76     index-format again in an incompatible way.
77     Refer to the Amanda_FAQ for more information about issues with the various
78     releases of GNU-tar.
79     If you need to use GNU-tar 1.12, get it at
80     ftp://ftp.gnu.org/pub/gnu/tar/tar-1.12.tar.gz
81     and apply the patch from patches/tar-1.12.patch. The first hunk may be
82     enough, unless it's a SunOS4 host. Read more about the patches in the patch
83     file itself.
84     GNU-tar 1.13.25 can be found at:
85     ftp://alpha.gnu.org/pub/gnu/tar/tar-1.13.25.tar.gz
86   o Samba:
87     Samba allows Unix systems to talk to PC clients. Amanda can back up
88     Microsoft Windows clients using Samba:
89     http://www.samba.org
90     Read Backup_PC_hosts_using_Samba for configuration tips and known
91     limitations.
92     Look at http://www.amanda.org/patches/ for up to date information on
93     patches.
94   o Perl:
95     If you wish to make use of some of the scripts that come with Amanda, you
96     will need to install Perl. You can get Perl from any CPAN site.
97     ftp://ftp.cpan.org/pub/CPAN/src/perl-5.6.1.tar.gz
98   o Awk:
99     One of the programs included in this package is amplot, which reads a data
100     file that Amanda generates for each dump and translates that information in
101     it into a nice picture that can be used to determine how your installation
102     is doing and if any parameters need to be changed. To use amplot, you need
103     a version of awk that understands command line variable substitutions, such
104     as nawk or gawk, which is available from
105     ftp://ftp.gnu.org/pub/gnu/gawk/gawk-3.1.1.tar.gz
106   o GNUplot:
107     Amplot also required that gnuplot be installed on your system. Gnuplot is
108     available at
109     http://www.gnuplot.org/ ftp://ftp.gnuplot.org/pub/gnuplot
110   o Other packages:
111     The process of building Amanda requires that some other packages be
112     installed on your system. The following packages are used:
113     ftp://ftp.gnu.org/pub/gnu/readline/readline-5.0.tar.gz
114     amrecover optionally uses the readline library for its command-line edition
115     mechanisms. (If you use a package-based distribution, check for the package
116     readline-devel-X.Y.rpm.) This library itself requires either termcap,
117     curses or ncurses. termcap is preferred, and it may be obtained from:
118     ftp://ftp.gnu.org/pub/gnu/termcap/termcap-1.3.1.tar.gz.
119     If you wish to edit and enhance Amanda, you may need to install the
120     following tools. Autoconf and automake are required if you are going to
121     rebuild the Makefiles and auto configuration scripts. Bison is only needed
122     if you are going to work on the index server and client code.
123     ftp://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.53.tar.gz ftp://ftp.gnu.org/
124     pub/gnu/automake/automake-1.6.3.tar.gz ftp://ftp.gnu.org/pub/gnu/bison/
125     bison-1.27.tar.gz ftp://ftp.gnu.org/pub/gnu/flex/flex-2.5.4a.tar.gz
126
127 * Read about the different configuration options available for building and
128   running Amanda. To see the options, do both:
129
130   o Run ./configure --help to see the available options that configure takes.
131   o Read the file example/config.site which gives longer descriptions to the
132     same options.
133
134 * Choose which user and group you will run the dumps under. Common choices for
135   user are `bin' or another user specifically created for Amanda, such as
136   `amanda'; common choices for group are `operator' or `disk'. If you do not
137   specify --with-user=<username> and --with-group=<groupname>, configure will
138   abort. Also choose the default name for your configuration, such as `csd' or
139   `DailySet1'). This name is used by the Amanda commands to choose one of
140   multiple possible configurations. You may specify it using the --with-
141   config=<confgname>.
142 * Decide where Amanda will live. You need to choose a root directory for
143   Amanda. Let this root directory be called $prefix. Unless you change the
144   default behavior with the appropriate command line options, Amanda will
145   install itself as. Listed below you find the appropriate configure-option for
146   each directory to change the location of this part of Amanda.
147
148     --sbindir=$prefix/sbin                                      Amanda server side programs
149     --libexecdir=$prefix/libexec                                Amanda backup client programs
150     --libdir=$prefix/lib                                        Amanda dynamic libraries
151     --with-configdir=$prefix/etc/amanda                 Runtime configuration files
152     --with-gnutar-listdir=$prefix/var/amanda/gnutar-lists       Directory for GNU-tar
153     lists (client)
154     --mandir=$prefix/man                                        Directory for manual pages
155
156   Note that the GNU-tar listdir should be a local filesystem on each client
157   that is going to be backed up with GNU-tar. If it really must be NFS-mounted,
158   make sure the filesystem is exported so that the client has root access to
159   it.
160 * Decide if you are compiling Amanda on a server only or a client only
161   platform. If you have a particular operating system that will only be a
162   Amanda client and will never run as the master tape host, then add the --
163   without-server option to configure. In the unlikely case that you have a
164   particular operating system that will serve as the tape host and you do not
165   wish to back up any machines that run this operating system, add the --
166   without-client option to the configure options. There are many other
167   configuration switches for Amanda. You may learn more about them by running
168   configure --help and by reading examples/config.site.
169 * Now configure Amanda. There are two ways of doing this. If you are running
170   Amanda on a single OS, then probably the first method works better for you.
171   If you need to support multiple platforms, then the second method will work
172   better.
173
174   o Run configure as non-root-user with the appropriate command line options.
175     You will probably want to remember the command line options for future
176     builds of Amanda.
177   o Edit examples/config.site and install it in the directory $prefix/etc or
178     $prefix/share. When configure runs the next time it will look for this file
179     and use it to configure Amanda.
180
181
182
183  Building and installing the binaries
184
185
186 * Back at the top-level source directory, build the sources:
187
188     make
189     su root; make install
190
191   Make sure that you don't build the software as root, you may run the first
192   make-command as the Amanda-user, for example. On the other hand you have to
193   run make install as root to get the binaries installed with the proper
194   permissions. If you want to change the compiler flags, you can do so like
195   this:
196
197     make CFLAGS="-O3 -Wall"
198
199 * If you have built with USE_VERSION_SUFFIXES, you will want to create symlinks
200   to the version you wish to use, eg: ln -s amdump-x.y.z amdump This is not
201   done automatically by the install process, so that you can have multiple
202   Amanda versions co-existing, and choose yourself which to make the default
203   version. The script contrib/set_prod_link.pl may save you some keystrokes.
204 * Run ldconfig as root to update the paths to the recently installed shared
205   libraries.
206
207
208  Setting up your Amanda Configuration
209
210
211  Setting up the Tape Server Host
212
213
214 * Create the config directory (eg. /usr/local/etc/amanda/confname) and copy the
215   example/ files into that directory. Edit these files to be correct for your
216   site, consulting the amanda(8) man page if necessary. You can also send mail
217   to mailto://amanda-users@amanda.org if you are having trouble deciding how to
218   set things up. You will also need to create the directory for the log and
219   database files for the configuration to use (eg /usr/local/var/amanda/
220   confname), and the work directory on the holding disk. These directories need
221   to agree with the parameters in amanda.conf. Don't forget to make all these
222   directories writable by the dump user!
223   Make sure that you specify the *no-rewind* version of the tape device in your
224   amanda.conf file. This is a frequently encountered problem for new sites.
225   Note that you might want to temporarily set the option "no-record" in all
226   your dumptypes when first installing Amanda if you'd like to run tests of
227   Amanda in parallel with your existing dump scheme. Amanda will then run but
228   will not interfere with your current dumpdates. However, you don't want to
229   run with "no-record" under normal operations.
230 * Put Amanda into your crontab. Here's a sample:
231   Example 2.1. /etc/crontab
232
233     0 16 * * 1-5 /usr/local/sbin/amcheck -m confname
234     45 0 * * 2-6 /usr/local/sbin/amdump confname
235
236
237   This is for SunOS 4.x, which has a per-user crontab; most other systems also
238   require a userid on each cron line. See your cron(8) for details. With these
239   cron lines, Amanda will check that the correct tape is in the drive every
240   weekday afternoon at 4pm (if it isn't, all the operators will get mail). At
241   12:45am that night the dumps will be run.
242 * Put the Amanda services into your /etc/services file. Add entries like:
243   Example 2.2. /etc/services
244
245     amanda              10080/udp
246     amandaidx   10082/tcp
247     amidxtape   10083/tcp
248
249
250   You may choose a different port number if you like, but it must match that in
251   the services file on the client hosts too.
252   If you are running NIS (aka YP), you have to enter the Amanda service into
253   your NIS services database. Consult your NIS documentation for details.
254   You may use the `patch-system' script, from client-src, in order to modify
255   this file. Run it with a `-h' argument for usage.
256 * If you are going to use the indexing capabilities of Amanda, follow one of
257   the following steps:
258
259   o If your server uses inetd, then add these lines to your inetd.conf on the
260     tape server host:
261     Example 2.3. /etc/inetd.conf
262
263         amandaidx stream tcp nowait $USER $AMINDEXD_PATH amindexd
264         amidxtape stream tcp nowait $USER $AMIDXTAPED_PATH amidxtaped
265
266
267     where $AMINDEXD_PATH and $AMIDXTAPED_PATH are the complete paths to where
268     the amindexd and amidxtaped executables (usually libexec_dir/amindexd and
269     libexec_dir/amidxtaped), and USER is the Amanda user.
270     You may use the `patch-system' script, from client-src, in order to modify
271     this file. Run it with a `-h' argument for usage.
272   o If your tape server uses xinetd instead of inetd, then you have to add the
273     following two files to your xinetd-configuration (usually /etc/xinetd.d)
274     and edit the paths:
275     Example 2.4. /etc/xinetd.d/amandaidx
276
277         service amandaidx
278       {
279         socket_type             = stream
280                 protocol                = tcp
281                 wait                    = no
282                 user                    = $USER
283                 group                   = $GROUP
284                 groups                  = yes
285                 server                  = $AMINDEXD_PATH/amindexd }
286
287
288     Example 2.5. /etc/xinetd.d/amidxtape
289
290       service amidxtape
291       {
292         socket_type             = stream
293                 protocol                = tcp
294                 wait                    = no
295                 user                    = $USER
296                 group                   = $GROUP
297                 groups                  = yes
298                 server                  = $AMIDXTAPED_PATH/amidxtaped }
299
300
301   o If your tape server uses Dan Bernstein's daemontools http://cr.yp.to/
302     daemontools.html) instead of (x)inetd, you have to create amandaidx and
303     amidxtape services by hand.
304
305     # Create service directories:
306
307         mkdir -p $prefix/etc/amanda/supervise/amandaidx
308         mkdir -p $prefix/etc/amanda/supervise/amidxtape
309
310     # Create service startup files and make them executable:
311       Example 2.6. /etc/amanda/supervise/amandaidx/run
312
313         #!/bin/sh
314         exec /usr/local/bin/setuidgid amanda \
315         /usr/local/bin/tcpserver -DHRl0 0 10082 \
316         /usr/local/libexec/amindexd >/dev/null 2>/dev/null
317
318
319       Example 2.7. /etc/amanda/supervise/amidxtape/run
320
321         #!/bin/sh
322         exec /usr/local/bin/setuidgid amanda \
323         /usr/local/bin/tcpserver -DHRl0 0 10083 \
324         /usr/local/libexec/amidxtaped >/dev/null 2>/dev/null
325
326
327     # Link service directories into your svscan directory:
328
329         cd /service
330         ln -s $prefix/etc/amanda/supervise/amandaidx .
331         ln -s $prefix/etc/amanda/supervise/amidxtape .
332
333
334
335 * If the tape server host is itself going to be backed up (as is usually the
336   case), you must also follow the client-side install instructions below on the
337   server host, INCLUDING setting up the file .amandahosts so that the server
338   host lets itself in. This is a frequently encountered problem for new sites.
339
340
341  Set up the Backup Client Hosts
342
343
344 * When using BSD-style security (enabled by default), set up your
345   ~dumpuser/.amandahosts (or ~dumpuser/.rhosts and/or /etc/hosts.equiv, if you
346   have configured --without-amandahosts) so that the dumpuser is allowed in
347   from the server host. Only canonical host names will be accepted in
348   .amandahosts, and usernames must be present in every line, because this is
349   safer.
350 * Set up your raw disk devices so that the dumpuser can read them, and /etc/
351   dumpdates so that the dumpuser can write to it. Normally this is done by
352   making the disk devices readable by (and dumpdates read/writable by) group
353   `operator', and putting the dumpuser into that group.
354 * Put the Amanda service into your /etc/services file. Add entry like:
355   Example 2.8. /etc/services
356
357     amanda              10080/udp
358     amandaidx   10082/tcp
359     amidxtape   10083/tcp
360
361
362   You may choose a different port number if you like, but it must match that in
363   the services file on the tape server host too.
364   If you are running NIS (aka YP), you have to enter the Amanda service into
365   your NIS services database. Consult your NIS documentation for details.
366   You may use the `patch-system' script, from client-src, in order to modify
367   this file. Run it with a `-h' argument for usage.
368 * Follow one of the following steps to set up the Amanda client service:
369
370   o If your Amanda client uses inetd, put the Amanda client service into
371     inetd's config file. This file is usually found in /etc/inetd.conf, but on
372     older systems it is /etc/servers. The format is different on different
373     OSes, so you must consult the inetd man page for your site. Here is an
374     example from our site, again from SunOS 4.x:
375     Example 2.9. /etc/inetd.conf
376
377       amanda dgram udp wait USER AMANDAD_PATH amandad
378
379
380     You may use the `patch-system' script, from client-src, in order to modify
381     this file. Run it with a `-h' argument for usage.
382   o If your Amanda client uses xinetd, you have to add the following file to
383     your xinetd-configuration (usually /etc/xinetd.d) and edit it to reflect
384     your settings and paths:
385     Example 2.10. /etc/xinetd.d/amanda
386
387       service amanda
388       {
389       socket_type               = dgram
390       protocol          = udp
391       wait                      = yes
392       user                      = $USER
393       group                     = $GROUP
394       groups                    = yes
395       server                    = $AMANDAD_PATH/amandad
396       }
397
398
399   o If your Amanda client uses Dan Bernstein's daemontools (http://cr.yp.to/
400     daemontools.html) instead of (x)inetd, you have to create the amanda
401     service by hand. You will need also an UDP super-server (netcat in this
402     example).
403
404     # Create service directory:
405
406         mkdir -p /etc/amanda/supervise/amanda
407
408     # Create service startup file and make it executable:
409       Example 2.11. /etc/amanda/supervise/amanda/run
410
411         #!/bin/sh
412         exec /usr/local/bin/setuidgid amanda \
413           /usr/bin/netcat -l -u -p 10080 -q 0 \
414           -e /usr/local/libexec/amandad >/dev/null 2>/dev/null
415
416
417
418       Note
419
420       The netcat-binary used in this run-file might also be called /usr/bin/nc
421       on your system, depending on the OS-distribution you use. Refer to http:/
422       /netcat.sourceforge.net for details of netcat.
423     # Link service directory into your svscan directory:
424
425         cd /service
426         ln -s /etc/amanda/supervise/amanda .
427
428
429
430 * If you are using (x)inetd, kick inetd/xinetd to make it read its config file.
431   On most systems you can just execute kill -HUP inetd (or xinetd). On older
432   systems you may have to kill it completely and restart it. Note that killing/
433   restarting (x)inetd is not safe to do unless you are sure that no (x)inetd
434   services (like rlogin) are currently in use, otherwise (x)inetd will not be
435   able to bind that port and that service will be unavailable.
436   If you are using the daemontools, svscan should detect and start your new
437   services automatically.
438 * If you intend to back up xfs filesystems on hosts running IRIX, you must
439   create the directory /var/xfsdump/inventory, otherwise xfsdump will not work.
440
441 THAT'S IT! YOU ARE READY TO RUN, UNLESS WE FORGOT SOMETHING.
442 Please send mail to mailto://amanda-users@amanda.org if you have any comments
443 or questions. We're not afraid of negative reviews, so let us have it!
444 Before writing questions, you may prefer to take a look at the Amanda_FAQ and
445 at the Amanda home page, at http://www.amanda.org. Browsable archives of Amanda
446 mailing-lists are available at http://marc.theaimsgroup.com/?l=amanda-users and
447 http://marc.theaimsgroup.com/?l=amanda-hackers.
448 -------------------------------------------------------------------------------
449
450 Prev                                       Up                   Next
451 Chapter 1. Amanda 2.5.0 - System-Specific Home  Chapter 3. Excluding
452 Installation Notes 
453