Installation

From wiki.zmanda.com
Revision as of 01:06, 10 November 2005 by Paddy (talk | contribs)
Jump to navigation Jump to search

Getting AMANDA source tree

At first you have to get the AMANDA source tree. There are two main ways to get the source tree:

  1. You can get a tarball at www.amanda.org
  2. You can checkout a copy from the AMANDA-CVS. See CVS tree section.

CVS tree

Amanda project's SourceForge CVS repository can be checked out as "anonymous" user with the following command. The module you wish to check out must be specified as the modulename. When prompted for a password for "anonymous" user, simply press the Enter key.

 cvs -d:pserver:[email protected]:/cvsroot/amanda login 
 cvs -z3 -d:pserver:[email protected]:/cvsroot/amanda co <modulename>
 <modulename> has to be "amanda"

All CVS commands executed within the module's directory does not need the -d parameter.

Building Amanda binaries

If you have different platforms, you only need to install the whole AMANDA package on the tape server host (the one with tape drive). On the backup client hosts (the ones you are going to dump), you only need to compile some of the AMANDA programs (See Backup client configuration).

Dependencies

AMANDA can optionally make use of the following packages to back up different types of clients or clients with different filesystem dumping programs.

  • GNU-tar: If you wish to use GNU-tar to back up filesystems, it is recommended to use GNU-tar 1.13.25. Plain GNU-tar 1.12 needs to be patched to handle large files (> 2GB). Plain GNU-tar 1.13 creates bad index-lists which amrecover cannot handle, as does the rarely used GNU-tar 1.13.9x, which changed the index-format again in an incompatible way.
Refer to the AMANDA FAQ for more information about issues with the various releases of GNU-tar. If you need to use GNU-tar 1.12, get it at ftp://ftp.gnu.org/pub/gnu/tar/tar-1.12.tar.gz
and apply the patch from patches/tar-1.12.patch. The first hunk may be enough, unless it's a SunOS4 host. Read more about the patches in the patch file itself.

GNU-tar 1.13.25 can be found at: ftp://alpha.gnu.org/pub/gnu/tar/tar-1.13.25.tar.gz

  • Samba: Samba allows Unix systems to talk to Windows clients. AMANDA can back up Microsoft Windows clients using samba. Read Backup PC hosts using Samba for configuration tips and known limitations.
  • Awk: One of the programs included in this package is amplot, which reads a data file that AMANDA generates for each dump and translates that information in it into a nice picture that can be used to determine how your installation is doing and if any parameters need to be changed. To use amplot, you need a version of awk that understands command line variable substitutions, such as nawk or gawk, which is available from ftp://ftp.gnu.org/pub/gnu/gawk/gawk-3.1.1.tar.gz
  • readline library: amrecover command optionally uses the readline library for its command-line edition mechanisms. (If you use a package-based distribution, check for the package readline-devel-X.Y.rpm.) This library itself requires either termcap, curses or ncurses. termcap is preferred, and both libraries can be obtained from:
           ftp://ftp.gnu.org/pub/gnu/readline/readline-5.0.tar.gz
           ftp://ftp.gnu.org/pub/gnu/termcap/termcap-1.3.1.tar.gz
  • Build tools (autoconf, automake, bison): If you are an AMANDA developer, you may need to install the following tools. Autoconf and automake are required if you are going to rebuild the Makefiles and auto configuration scripts. Bison is only needed if you are going to work on the index server and client code.
           ftp://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.53.tar.gz 
           ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.3.tar.gz 
           ftp://ftp.gnu.org/pub/gnu/bison/bison-1.27.tar.gz 
           ftp://ftp.gnu.org/pub/gnu/flex/flex-2.5.4a.tar.gz 

Compile time parameters

Read about the different configuration options available for building and running AMANDA. To see the options, do both:

  1. Run ./configure --help to see the available options that configure takes.
  2. Read the file example/config.site which gives longer descriptions to the same options.


Configure command line options

  • Choose which user and group you will run the dumps under. Common choices for user are `bin' or another user specifically created for AMANDA, such as `amanda'; common choices for group are `operator' or `disk'. If you do not specify --with-user=<username> and --with-group=<groupname>, configure will abort.
  • Choose the default name for your configuration, such as `csd' or `DailySet1'). This name is used by the AMANDA commands to choose one of multiple possible configurations. You may specify it using the --with-config=<confgname>.
  • Decide where AMANDA will live. You need to choose a root directory for AMANDA. Let this root directory be called $prefix. Unless you change the default behavior with the appropriate command line options, AMANDA will install itself as. Listed below you find the appropriate configure-option for each directory to change the location of this part of AMANDA.
--sbindir=$prefix/sbin					AMANDA server side programs
--libexecdir=$prefix/libexec				AMANDA backup client programs
--libdir=$prefix/lib					AMANDA dynamic libraries
--with-configdir=$prefix/etc/amanda			Runtime configuration files
--with-gnutar-listdir=$prefix/var/amanda/gnutar-lists	Directory for GNU-tar lists (client)
--mandir=$prefix/man					Directory for manual pages

Note that the GNU-tar listdir should be a local filesystem on each client that is going to be backed up with GNU-tar. If it really must be NFS-mounted, make sure the filesystem is exported so that the client has root access to it.

  • Decide if you are compiling AMANDA on a server only or a client only platform. If you have a particular operating system that will only be a AMANDA client and will never run as the master tape host, then add the --without-server option to configure. In the unlikely case that you have a particular operating system that will serve as the tape host and you do not wish to back up any machines that run this operating system, add the --without-client option to the configure options.


Now configure AMANDA. There are two ways of doing this. If you are running AMANDA on a single OS, then probably the first method works better for you. If you need to support multiple platforms, then the second method will work better.

  1. Run configure as non-root-user with the appropriate command line options. You will probably want to remember the command line options for future builds of AMANDA.
  1. Edit examples/config.site and install it in the directory $prefix/etc or $prefix/share. When configure runs the next time it will look for this file and use it to configure AMANDA.

Installing Amanda binaries

  • Back at the top-level source directory, build the sources:
make
su root; make install

Make sure that you don't build the software as root, you may run the first make-command as the AMANDA-user, for example. On the other hand you have to run make install as root to get the binaries installed with the proper permissions. If you want to change the compiler flags, you can do so like this:

make CFLAGS="-O3 -Wall"
  • If you have built with USE_VERSION_SUFFIXES, you will want to create symlinks to the version you wish to use, eg: ln -s amdump-x.y.z amdump This is not done automatically by the install process, so that you can have multiple AMANDA versions co-existing, and choose yourself which to make the default version. The script contrib/set_prod_link.pl may save you some keystrokes.
  • Run ldconfig as root to update the paths to the recently installed shared libraries.


OS specific installation notes