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