Chapter 2. Installation

Gold uses the standard configure, make and make install steps that we all know and love. However, there are a number of preparation, prerequisite, setup and customization steps that need to be performed. This document provides general installation guidance and provides a number of sample steps referenced to a particular installation on a Linux platform using the bash shell. These steps indicate the userid in brackets performing the step. The exact commands to be performed and the user that issues them will vary based on the platform, shell, installation preferences, etc.

2.1. Preparation

To build and install Gold, you first need to unpack the archive and change directory into the top directory of the distribution. For security reasons, it is recommended that you install and run Gold under its own non-root userid.

[root]# useradd scottmo

[root]# passwd scottmo

[scottmo]$ mkdir ~/src

[scottmo]$ cd ~/src

[scottmo]$ gzip -cd gold-2.1.12.2.tar.gz | tar xvf -

[scottmo]$ cd gold-2.1.12.2

2.1.1. Select a Database

Gold makes use of a database for transactions and data persistence. Three databases have been tested for use with Gold thus far: PostgreSQL, MySQL and SQLite. Postgres and MySQL are external databases which run in a distinct (possibly remote) process and communicate over sockets. These databases must be separately installed, configured and started. SQLite is an embedded database bundled with the Gold source code with SQL queries being performed within the goldd process itself through library calls. The following information may help you make a choice of databases to use.

  • PostgreSQL — PostgreSQL is an open source database. Gold requires Postgres 7.2 or higher (7.1 can probably be used but generates warnings from the DBD::Pg module). The PostgreSQL database has been thoroughly tested in production with Gold and all Gold functionality is available since it was developed using the PostgreSQL database. Postgres supports multiple connections so Gold is configured to be a forking server when using PostgreSQL.

    PostgreSQL is recommended since it is an excellent database, has been more thoroughly tested than the others, and supports all Gold features.

  • MySQL — MySQL is an open source database. Gold requires MySQL 4.0.6 or higher. (Prior versions did not support UNION which is used by Gold in time travel. It is possible to use 4.0 with a minor code tweak to the OFFSET line in Database.pm).

    MySQL 4.1 is required in order to have support for the (undocumented) Transaction Undo and Redo functionality since subqueries were not supported until this version.

  • SQLite — SQLite is an open source embedded database bundled with Gold. It does not require any configuration and reads and writes from a file. Initial testing has shown Gold to perform at least as fast as PostgreSQL for small databases.

    Due to the lack of "ALTER TABLE" functionality, Gold objects cannot be customized after installation. It appears that this functionality is likely to be forthcoming in a future release of SQLite.

    Since SQLite supports only a single connection, Gold is not configured to be a forking server when using SQLite. This should probably not be an issue for small to medium sized clusters.

    Due to a lack of support for multi-column IN clauses, the (undocumented) Transaction Undo and Redo functions are not available.