Difference between revisions of "Installation"

From The Open Source Backup Wiki (Amanda, MySQL Backup, BackupPC)
Jump to navigationJump to search
Line 1: Line 1:
* Getting AMANDA
+
== Getting AMANDA source tree ==
  
At first you have to get the AMANDA-source-code.
+
At first you have to get the AMANDA source tree. There are two main ways to get the source tree:
There are two main ways to get that code:
 
  
You can get a tarball at www.amanda.org or you can checkout a copy from the AMANDA-CVS.
+
# You can get a tarball at www.amanda.org  
 +
# You can checkout a copy from the AMANDA-CVS. See [[#CVS tree|CVS tree]] section.
  
 +
===CVS tree===
  
* Anonymous CVS Access
+
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.
  
This project's SourceForge CVS repository can be checked out through anonymous (pserver) CVS with the following instruction set. The module you wish to check out must be specified as the modulename. When prompted for a password for anonymous, 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 [http://www.samba.org samba].  Read Backup PC hosts using Samba for configuration tips and known limitations.
 +
       
 +
* Perl: If you wish to make use of some of the scripts that come with AMANDA, you will need to install Perl. You can get Perl from any CPAN site. ftp://ftp.cpan.org/pub/CPAN/src/perl-5.6.1.tar.gz
 +
 
 +
* 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
 +
 
 +
* GNUplot: [Amplot]] also required that gnuplot be installed on your system. [http://www.gnuplot.org/ Gnuplot] is available at  ftp://ftp.gnuplot.org/pub/gnuplot
 +
 
 +
* 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:
 +
 
 +
# Run ./configure --help to see the available options that configure takes.
 +
# 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>.
  
  cvs -d:pserver:anonymous@cvs.amanda.sourceforge.net:/cvsroot/amanda login
+
* 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.
  
  
  cvs -z3 -d:pserver:anonymous@cvs.amanda.sourceforge.net:/cvsroot/amanda co modulename
+
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.
  
Updates from within the module's directory do not need the -d parameter.
+
# 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.
  
 +
# 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.
  
  
* Building AMANDA
+
==OS specific installation notes==
** Build dependencies
 
** Compile time parameters
 
* OS specific installation notes
 

Revision as of 01:03, 10 November 2005

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.


OS specific installation notes