Installing Whitebeam from Source

Site Map
 
Home
 
Application Guide
Reference
  Installation
    From source
    From RPM
    Getting Started
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

Installing Whitebeam from Source

This page gives information on how to build and install Whitebeam from source code on a Unix like operating system (Linux, OpenBSD, FreeBSD etc).

Since version 1.1.3, Whitebeam has also been available as a source RPM distribution. Information on the S/RPM installation of Whitebeam can be found here.

Upgrading from earier versions of Whitebeam

From version 0.9.35 we've modified the Postgres database schema slightly. The most significant change from previous versions is that we no longer use Postgres Large Objects to hold file objects. This is a requirements to support replication (we've not found a replication system that can deal with Large Objects!).

This does mean that old databases must be migrated to the new schema. This is fairly straightforward, We've put together some notes to help you

What we're building

These instructions will build a shared object for the Apache web-server (version 1.3.x or 2.x) and will install the Whitebeam Apache module and the associated application modules (templates).

Note the build instructions from version 0.9.35 have been significantly simplified from previous versions.

The instructions use specific versions of various components to illustrate the entire build process. You should adjust these instructions for more recent versions as necessary!

Things you'll need

Download or otherwise obtain (i.e. recommend installing from packages from your distribution!) the following modules:

You will need the following applications installed on you server. For most operating systems the standard distributions will include suitable versions of these applications. If necessary download and build.

ApplicationDownloadOrganisationComment
Apache web serverApache 1.3.41 or
Apache 2.0.63 or
Apache 2.2.9
Apache organisationWhitebeam works with all major releases of Apache - usually stck to the one that comes with your distribtuion
Postgres databasePostgres 8.3.3PostgreSQL Global Development GroupVersion 8.1 onwards offers significant performance improvements over earlier releases - use the most recent version you can.
libcurlcurl-7.18.2.tar.gzCurl developersUsed to allow applications to make HTTP requests to other sites (eg for web-services)
libgdgd-2.0.35LibGD developersOptional - but without it you can't manipulate GIF/JPEG images etc. Really useful! LibGD has some other dependencies of it's own so you'll want to check those.

Your Apache installation can of course include other Apache modules. We'd recommend including SSL if it's not already present.

Also note that you'll need the development headers for each of these components if you don't already have them. These are sometimes included in additional packages.

With Apache and Postgres installed on your system, you'll also need to download the Whitebeam source tree:

Whitebeam is written in C/C++ and to build you'll also need a GNU C++ tool chain. Again this is generally available as part of your standard Linux distribution.

Building

Quick Instructions

    # ASSUMPTIONS:
    #   Assuming Apache and Postgres are installed

    # Extract Whitebeam
    $ tar zxcfp whitebeam_1_2_1.tar.gz
    $ cd whitebeam_1_2_1

    # Now with the rest of the build. 
    # Note: You need to have the Postgres server include files available under the standard
    # Postgres include directory in order to build native Postgres support (--enable-pgsql).
    # Some binary installations include these, and they appear to be included in a standard
    # build of PostreSQL version 8.x. For version 7.4.x, you may need to build
    # from source and include all header files using :
    #     gmake install-all-headers
    #
    # If you don't have these headers or do not want native Postgres supoport in Whitebeam 
    # then leave --enable-pgsql from the configure line.
    #
    # Configure Whitebeam with native Postgres functionality built into the system. If configure
    # fails to find the necessary files use ./configure --help
    $ ./configure --enable-pgsql --enable-curl --enable-gd
    #
    # Build Whitebeam
    $ gmake
    #
    # Change to 'root' to install Whitebeam
    $ su
    $ ****
    $ gmake install
    #
    # The standard install path for Whitebeam is /var/whitebeam. The Apache shared object file 
    # will be installed into /var/whitebeam/lib, which can be referenced from httpd.conf
    #
    # DONE!
  

In detail

Building on any UNIX like platform uses a GNU autoconf configure script to configure the distribution. In theory, this means Whitebeam should build on a wide range of platforms.

  1. Ensure you have the GNU Make utility on your system - On Linux systems this will likely be the default make utility, on BSD systems it may need to be installed seperately, and will probably be called "gmake".
  2. You need to have a recent copy of openSSL installed on your system. If you haven't then see the link earlier in this document.
  3. In a convenient working directory untar Whitebeam
     
    $ tar zxvfp whitebeam_1_2_1.tar.gz
    $ cd whitebeam_1_2_1
    
  4. Configure Whitebeam, including native Postgres support:
    $ ./configure --enable-pgsql --enable-curl --enable-gd
    

    Whitebeam should find Apache, Postgres, Curl and he LibGD graphic headers. In this case we assume Postgres is in it's default installation directory. Alternatively you can use the options --with-apache=<path to Apache> and --with-pgsql=<path to postgres> to locate the source tree without having to build Postgres.

    Note: You need to have the Postgres server include files available under the standard Postgres include directory in order to build native Postgres support (--enable-pgsql). Some binary installations include these, and they appear to be included in a standard build of PostreSQL version 8 Beta releases. For version 7.4.x, you may need to build from source and include all header files using :

    gmake install-all-headers

    If you don't have these headers or do not want native Postgres supoport in Whitebeam then leave --enable-pgsql from the configure line.

  5. Make the Whitebeam libraries and binaries. This will build Apache - but we need to do this again to build the shared object for Whitebeam.
    $ gmake
    
  6. Next, you will probably need to su to root in order to install the Whitebeam files in your local system directories:
    $ su
    Password:
    # gmake install
    

The build/install sequence will by default install all of Whitebeam into /var/whitebeam. This directory has the following sub-directories:

  • /var/whitebeam/bin
    Contains the executable binaries for the Whitebeam templates and for the Whitebeam replication engine
  • /var/whitebeam/conf
    Contains XML syntax definition files for XML based template communications, for the Presentation Engine markup and for HTML itself.
  • /var/whitebeam/conf/template
    Contains XML service specifications for the various template services.
  • /var/whitebeam/lib
    Contains static link Whitebeam libraries and the shared library Apache module. You can directly reference the shared library from the Apache httpd.conf file using /var/whitebeam/lib/libwhitebeam1.so (for Apache 1.3.x) or /var/whitebeam/lib/libwhitebeam2.so (Apache 2.x).

If your attempt to build Whitebeam fails, please tell us, including the exact version of the OS, the ouput of configure and make.

A full version of Apache, including an httpd.conf.default configured with Whitebeam configuration directives, and a copy of the Whitebeam htdocs tree should have been installed in the configured Apache ServerRoot.

For further details see the Getting Started page.

Whitebeam release 1.3.36
View XML source of this page
(loadtime : 15ms)