Chapter 2. Building and installing
Prev |  | Next

## Chapter 2. Building and installing

## Before you start

Firstly, check that all the clocks on your clients, servers and signing machines are accurate and in sync. A disagreement in time between a client and a server is the biggest cause of installation difficulties, as the times in the generated certificates will cause login failures if the start date is in the future.

## Box Backup compile

In the following instructions, replace 0.00 with the actual version number of the archive you have downloaded.

For help building on Windows, see the Windows Compile Appendix. And if you want to build a Linux RPM, look here.

You need the latest version of OpenSSL, as some of the extra APIs it provides are required. You should have this anyway, as earlier versions have security flaws. (If you have an earlier version installed, the configuration script will give you instructions on enabling experimental support for older versions.)

See OpenSSL notes for more information on OpenSSL issues.

There are some notes in the archive about compiling on various platforms within the boxbackup-0.00 directory -- read them first. For example, if you are compiling under Linux, look for LINUX.txt as boxbackup-0.00/LINUX.txt after untaring the archive.

Download the archive, then in that directory type

    tar xvzf boxbackup-0.00.tgz
    cd boxbackup-0.00
    ./configure
    make

The server and client will be built and packaged up for installation on this machine, or ready to be transferred as tar files to another machine for installation.

This builds two parcels of binaries and scripts, 'backup-client' and 'backup-server'. The generated installation scripts assumes you want everything installed in /usr/local/bin

Optionally, type make test to run all the tests.

## Local installation

Type make install-backup-client to install the backup client.

Type make install-backup-server to install the backup server.

## Remote installation

In the parcels directory, there are tar files for each parcel. The name reflects the version and platform you have built it for.

Transfer this tar file to the remote server, and unpack it, then run the install script. For example:

    tar xvzf boxbackup-0.00-backup-server-OpenBSD.tgz
    cd boxbackup-0.00-backup-server-OpenBSD
    ./install-backup-server

## Configure options

You can use arguments to the configure script to adjust the compile and link lines in the generated Makefiles, should this be necessary for your platform. The configure script takes the usual GNU autoconf arguments, a full list of which can be obtained with --help. Additional options for Box Backup include:

--enable-gnu-readline | Use GNU readline if present. Linking Box Backup against GNU readline may create licence implications if you then distribute the binaries. libeditline is also supported as a safe alternative, and is used by default if available.
--disable-largefile | Omit support for large files
--with-bdb-lib=DIR | Specify Berkeley DB library location
--with-bdb-headers=DIR | Specify Berkeley DB headers location
--with-random=FILE | Use FILE as random number seed (normally auto-detected)
--with-tmp-dir=DIR | Directory for temporary files (normally /tmp)

See OpenSSL notes for the OpenSSL specific options.

## Tests

There are a number of unit tests provided. To compile and run one type:

    ./runtest.pl bbackupd release
    ./runtest.pl common debug
    ./runtest.pl ALL

The runtest.pl script will compile and run the test. The first argument is the test name, and the second the type of build. Use ALL as a test name to run all the tests.

The output from the tests is slightly muddled using this script. If you're developing, porting or trying out new things, it might be better to use the following scheme:

    cd test/bbackupd
    make
    cd ../../debug/test/bbackupd
    ./t

or in release mode...

    cd test/bbackupd
    make -D RELEASE
    cd ../../release/test/bbackupd
    ./t

(use RELEASE=1 with GNU make)

I tend to use two windows, one for compilation, and one for running tests.

Prev |  | Next
Chapter 1. Introduction | Home | Appendix A. Box Backup and SSL