Imported Upstream version 2.4.5
[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
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   a. Read this document all the way through.
48   b. 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   c. 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   d. If you are using KERBEROS authentication, read Kerberos for details on
54      installing and running the kerberized version of AMANDA.
55   e. 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 1.2.H below).
64
65  Source configuration
66
67
68   a. AMANDA can optionally make use of the following packages to back up
69      different types of clients or clients with different filesystem dumping
70      programs. If you wish to use GNU-tar to back up filesystems, it is
71      recommended to use GNU-tar 1.13.25. Plain GNU-tar 1.12 needs to be patched
72      to handle large files (> 2GB). Plain GNU-tar 1.13 creates bad index-lists
73      which amrecover cannot handle, as does the rarely used GNU-tar 1.13.9x,
74      which changed the index-format again in an incompatible way.
75      If you need to use GNU-tar 1.12, get it at
76      ftp://ftp.gnu.org/pub/gnu/tar/tar-1.12.tar.gz
77      and apply the patch from patches/tar-1.12.patch. The first hunk may be
78      enough, unless it's a SunOS4 host. Read more about the patches in the
79      patch file itself.
80      GNU-tar 1.13.25 can be found at:
81      ftp://alpha.gnu.org/pub/gnu/tar/tar-1.13.25.tar.gz
82      Samba allows Unix systems to talk to PC clients. AMANDA can back up
83      Microsoft Windows clients using Samba:
84      http://www.samba.org
85      Read Samba for configuration tips and known limitations.
86      Look at http://www.amanda.org/patches.html for up to date information on
87      patches.
88   b. If you wish to make use of some of the scripts that come with AMANDA, you
89      will need to install Perl. You can get Perl from any CPAN site. ftp://
90      ftp.cpan.org/pub/CPAN/src/perl-5.6.1.tar.gz
91   c. One of the programs included in this package is amplot, which reads a data
92      file that AMANDA generates for each dump and translates that information
93      in it into a nice picture that can be used to determine how your
94      installation is doing and if any parameters need to be changed. To use
95      amplot, you need a version of awk that understands command line variable
96      substitutions, such as nawk or gawk, which is available from
97      ftp://ftp.gnu.org/pub/gnu/gawk/gawk-3.1.1.tar.gz
98      Amplot also required that gnuplot be installed on your system. Gnuplot is
99      available at
100      http://www.gnuplot.org/ ftp://ftp.gnuplot.org/pub/gnuplot
101   d. The process of building AMANDA requires that some other packages be
102      installed on your system. The following packages are used:
103      ftp://ftp.gnu.org/pub/gnu/readline/readline-4.2.tar.gz amrecover
104      optionally uses the readline library for its command-line edition
105      mechanisms. This library itself requires either termcap, curses or
106      ncurses. termcap is preferred, and it may be obtained from: ftp://
107      ftp.gnu.org/pub/gnu/termcap/termcap-1.3.tar.gz
108      If you wish to edit and enhance AMANDA, you may need to install the
109      following tools. Autoconf and automake are required if you are going to
110      rebuild the Makefiles and auto configuration scripts. Bison is only needed
111      if you are going to work on the index server and client code.
112      ftp://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.53.tar.gz ftp://ftp.gnu.org/
113      pub/gnu/automake/automake-1.6.3.tar.gz ftp://ftp.gnu.org/pub/gnu/bison/
114      bison-1.27.tar.gz ftp://ftp.gnu.org/pub/gnu/flex/flex-2.5.4a.tar.gz
115   e. Read about the different configuration options available for building and
116      running AMANDA. To see the options, do both:
117
118        a. Run
119
120             ./configure --help
121
122           to see the available options that configure takes.
123        b. Read the example/config.site file which gives longer descriptions to
124           the same options as in step a).
125
126   f. Choose which user and group you will run the dumps under. Common choices
127      for user are `bin' or another user specifically created for AMANDA, such
128      as `amanda'; common choices for group are `operator' or `disk'. If you do
129      not specify --with-user=<username> and --with-group=<groupname>, configure
130      will abort. Also choose the default name for your configuration, such as
131      `csd' or `DailySet1'). This name is used by the AMANDA commands to choose
132      one of multiple possible configurations. You may specify it using the --
133      with-config=<confgname>.
134   g. Decide where AMANDA will live. You need to choose a root directory for
135      AMANDA. Let this root directory be called $prefix. Unless you change the
136      default behavior with the appropriate command line options, AMANDA will
137      install itself as. Listed below each directory is the appropriate
138      configure option to change the location of this part of AMANDA.
139
140        --sbindir=$prefix/sbin                                   AMANDA server side programs
141        --libexecdir=$prefix/libexec                             AMANDA backup client programs
142        --libdir=$prefix/lib                                     AMANDA dynamic libraries
143        --with-configdir=$prefix/etc/amanda                      Runtime configuration files
144        --with-gnutar-listdir=$prefix/var/amanda/gnutar-lists    Directory for
145        GNUtar lists (client)
146        --mandir=$prefix/man                                     Directory for manual pages
147
148      Note that the GNU-tar listdir should be a local filesystem on each client
149      that is going to be backed up with GNU tar. If it really must be NFS-
150      mounted, make sure the filesystem is exported so that the client has root
151      access to it.
152   h. Decide if you are compiling AMANDA on a server only or a client only
153      platform. If you have a particular operating system that will only be a
154      AMANDA client and will never run as the master tape host, then add the --
155      without-server option to configure. In the unlikely case that you have a
156      particular operating system that will serve as the tape host and you do
157      not wish to back up any machines that run this operating system, add the -
158      -without-client option to the configure options. There are many other
159      configuration switches for amanda. You may learn more about them by
160      running `configure --help' and by reading examples/config.site.
161   i. Now configure AMANDA. There are two ways of doing this. If you are running
162      AMANDA on a single OS, then probably the first method works better for
163      you. If you need to support multiple platforms, then the second method
164      will work better.
165
166        a. Run configure as non-root-user with the appropriate command line
167           options. You will probably want to remember the command line options
168           for future builds of AMANDA.
169        b. Edit example/config.site and install it in the directory $prefix/etc
170           or $prefix/share. When `configure' runs the next time it will look
171           for this file and use it to configure AMANDA.
172
173
174
175  Building and installing the binaries
176
177
178   a. Back at the top-level source directory, build the sources:
179
180        make
181        su root; make install
182
183      Make sure that you don't build the software as root, you may run the first
184      make-command as the AMANDA-user, for example. On the other hand you have
185      to run make install as root to get the binaries installed with the proper
186      permissions. If you want to change the compiler flags, you can do so like
187      this:
188
189        make CFLAGS="-O3 -Wall"
190
191   b. If you have built with USE_VERSION_SUFFIXES, you will want to create
192      symlinks to the version you wish to use, eg:
193
194        ln -s amdump-x.y.z amdump
195
196      This is not done automatically by the install process, so that you can
197      have multiple AMANDA versions co-existing, and choose yourself which to
198      make the default version. The script contrib/set_prod_link.pl may save you
199      some keystrokes.
200   c. Run `ldconfig' as root to update the paths to the recently installed
201      shared libraries.
202
203
204  Setting up your AMANDA Configuration
205
206
207  Setting up the Tape Server Host
208
209
210   a. Create the config directory (eg. /usr/local/etc/amanda/confname) and copy
211      the example/ files into that directory. Edit these files to be correct for
212      your site, consulting the amanda(8) man page if necessary. You can also
213      send mail to mailto://amanda-users@amanda.org if you are having trouble
214      deciding how to set things up. You will also need to create the directory
215      for the log and database files for the configuration to use (eg /usr/
216      local/var/amanda/confname), and the work directory on the holding disk.
217      These directories need to agree with the parameters in amanda.conf. Don't
218      forget to make all these directories writable by the dump user!
219      Make sure that you specify the *no-rewind* version of the tape device in
220      your amanda.conf file. This is a frequently encountered problem for new
221      sites.
222      Note that you might want to temporarily set the option "no-record" in all
223      your dumptypes when first installing AMANDA if you'd like to run tests of
224      AMANDA in parallel with your existing dump scheme. AMANDA will then run
225      but will not interfere with your current dumpdates. However, you don't
226      want to run with "no-record" under normal operations.
227   b. Put AMANDA into your crontab. Here's a sample:
228
229        0 16 * * 1-5 /usr/local/bin/amcheck -m confname
230        45 0 * * 2-6 /usr/local/bin/amdump confname
231
232      This is for SunOS 4.x, which has a per-user crontab; most other systems
233      also require a userid on each cron line. See your cron(8) for details.
234      With these cron lines, AMANDA will check that the correct tape is in the
235      drive every weekday afternoon at 4pm (if it isn't, all the operators will
236      get mail). At 12:45am that night the dumps will be run.
237   c. Put the AMANDA services into your /etc/services file. Add entries like:
238
239        amanda           10080/udp
240        amandaidx        10082/tcp
241        amidxtape        10083/tcp
242
243      You may choose a different port number if you like, but it must match that
244      in the services file on the client hosts too.
245      If you are running NIS (aka YP), you have to enter the AMANDA service into
246      your NIS services database. Consult your NIS documentation for details.
247      You may use the `patch-system' script, from client-src, in order to modify
248      this file. Run it with a `-h' argument for usage.
249   d. If you are going to use the indexing capabilities of AMANDA, and your
250      server uses inetd, then add these to your inetd.conf on the tape server
251      host:
252
253        amandaidx stream tcp nowait USER AMINDEXD_PATH amindexd
254        amidxtape stream tcp nowait USER AMIDXTAPED_PATH amidxtaped
255
256      where AMINDEXD_PATH and AMIDXTAPED_PATH are the complete paths to where
257      the amindexd and amidxtaped executables (usually libexec_dir/amindexd and
258      libexec_dir/amidxtaped), and USER is the AMANDA user.
259      You may use the `patch-system' script, from client-src, in order to modify
260      this file. Run it with a `-h' argument for usage.
261      If your tape server uses xinetd instead of inetd, then you have to add the
262      following two files to your xinetd-configuration (usually /etc/xinetd.d)
263      and edit the paths:
264
265        #/etc/xinetd.d/amandaidx
266        service amandaidx
267        {
268         socket_type             = stream
269         protocol                = tcp
270         wait                    = no
271         user                    = USER
272         group                   = GROUP
273         groups                  = yes
274         server                  = AMINDEXD_PATH/amindexd
275        }
276
277
278        #/etc/xinetd.d/amidxtaped
279        service amidxtape
280        {
281         socket_type             = stream
282         protocol                = tcp
283         wait                    = no
284         user                    = USER
285         group                   = GROUP
286         groups                  = yes
287         server                  = AMIDXTAPED_PATH/amidxtaped
288        }
289
290   e. If the tape server host is itself going to be backed up (as is usually the
291      case), you must also follow the client-side install instructions below on
292      the server host, INCLUDING setting up the file .amandahosts so that the
293      server host lets itself in. This is a frequently encountered problem for
294      new sites.
295
296
297  Set up the Backup Client Hosts
298
299
300   a. When using BSD-style security (enabled by default), set up your
301      ~dumpuser/.amandahosts (or ~dumpuser/.rhosts and/or /etc/hosts.equivi, if
302      you have configured --without-amandahosts) so that the dumpuser is allowed
303      in from the server host. Only canonical host names will be accepted in
304      .amandahosts, and usernames must be present in every line, because this is
305      safer.
306   b. Set up your raw disk devices so that the dumpuser can read them, and /etc/
307      dumpdates so that the dumpuser can write to it. Normally this is done by
308      making the disk devices readable by (and dumpdates read/writable by) group
309      `operator', and putting the dumpuser into that group.
310   c. Put the AMANDA service into your /etc/services file. Add entry like:
311
312        amanda           10080/udp
313        amandaidx        10082/tcp
314        amidxtape        10083/tcp
315
316      You may choose a different port number if you like, but it must match that
317      in the services file on the tape server host too.
318      If you are running NIS (aka YP), you have to enter the AMANDA service into
319      your NIS services database. Consult your NIS documentation for details.
320      You may use the `patch-system' script, from client-src, in order to modify
321      this file. Run it with a `-h' argument for usage.
322   d. If your AMANDA client uses inetd, put the AMANDA client service into
323      inetd's config file. This file is usually found in /etc/inetd.conf, but on
324      older systems it is /etc/servers. The format is different on different
325      OSes, so you must consult the inetd man page for your site. Here is an
326      example from our site, again from SunOS 4.x:
327
328        amanda dgram udp wait USER AMANDAD_PATH amandad
329
330      You may use the `patch-system' script, from client-src, in order to modify
331      this file. Run it with a `-h' argument for usage.
332      If your AMANDA client uses xinetd, you have to add the following file to
333      your xinetd-configuration (usually /etc/xinetd.d):
334
335        #/etc/xinetd.d/amanda
336        service amanda
337        {
338        socket_type              = dgram
339        protocol         = udp
340        wait                     = yes
341        user                     = USER
342        group                    = GROUP
343        groups                   = yes
344        server                   = AMANDAD_PATH/amandad
345        }
346
347   e. Kick inetd/xinetd to make it read its config file. On most systems you can
348      just execute kill -HUP inetd (or xinetd). On older systems you may have to
349      kill it completely and restart it. Note that killing/restarting (x)inetd
350      is not safe to do unless you are sure that no (x)inetd services (like
351      rlogin) are currently in use, otherwise (x)inetd will not be able to bind
352      that port and that service will be unavailable.
353   f. If you intend to back up xfs filesystems on hosts running IRIX, you must
354      create the directory /var/xfsdump/inventory, otherwise xfsdump will not
355      work.
356
357 THAT'S IT! YOU ARE READY TO RUN, UNLESS WE FORGOT SOMETHING.
358 Please send mail to mailto://amanda-users@amanda.org if you have any comments
359 or questions. We're not afraid of negative reviews, so let us have it!
360 Before writing questions, you may prefer to take a look at the AMANDA_FAQ and
361 at the AMANDA home page, at http://www.amanda.org. Browsable archives of AMANDA
362 mailing-lists are available at http://marc.theaimsgroup.com/?l=amanda-users and
363 http://marc.theaimsgroup.com/?l=amanda-hackers.
364 -------------------------------------------------------------------------------
365
366 Prev                                       Up                   Next
367 Chapter 1. AMANDA 2.4.x - System-Specific Home  Chapter 3. Excluding
368 Installation Notes 
369