GPT logo

Pre-requisites

You must have the following components installed in the server where you install GPT :

  • a webserver (GPT has been tested on Apache) ;
  • PHP >= 4 ;
  • PHP MySQL ;
  • a mail server ;

You also need a MySQL server accessible to the GPT installation.

You may for example use the following lines to give database access to GPT :

# mysqladmin create gpt
# mysqlaccess localhost gpt gpt -p
Password for MySQL user gpt: my_secret_password

Installation procedure

First, download GPT from the Gna project page of GPT : http://www.gna.org/projects/gpt

Unpack GPT

GPT is shipped both in a tarball and a zip file. We will give the directions for the tar.gz version.

If you have a shell access to your webserver, unpack GPT directly in your website directory tree, i.e. :

cd /var/www
tar xvfz gpt.tgz

If you only have a FTP access to your webserver, unpack GPT in your computer and recursively transfer the files to your webserver, using your favourite FTP client.

Configure GPT

Once you have unpacked GPT, point your web browser to its location. I.e http://domain.org/gpt/ (assuming domain.org is the visible hostname of the machine where you installed GPT).

GPT installation, step 1

Then, follow the procedure on the web page. There is a succession of steps to follow in given order, to configure one step, just click on the active link.

Database configuration

GPT installation, step 2

There are four parameters to configure. Your system administrator should have given relevant information to you.

  • Database host name : name or IP address of the server hosting the database
  • Database name : name of the database
  • Database username : login to use to connect to the database
  • Database password : password to use to connect to the database

Once the database is configured and if connection is setup correctly, you will see the following screen.

GPT installation, step 3

Schema creation

Just click on the link and schema will be created. Please note that your system administrator should have given sufficient rights to you.

Smarty installation

GPT uses Smarty as a template to render its content. For more convenience, we have included a stripped copy of Smarty in the distribution of GPT, so this step should be automagic.

If for some reason you do not want to use shipped Smarty, just delete the Smarty subdirectory. GPT will now try and detect if Smarty is installed in /usr/share/php/smarty/libs/Smarty.class.php.

Note: if you need to use another path and want GPT to be smarter and let you specify it, just ask the developer to add this feature.

For now, you should have the following result :

GPT installation, step 4

Election configuration

Some parameters should be set here regarding the election:

  • Election ID: short system name for the election. Should only contain digits and letters. It is not visible and is just used internally to separate several instances of GPT.
  • Election name : visible name of the election. Please note that if your GPT installation uses several languages (i.e. English and national language or in countries with several national languages like Belgium or Switzerland), you can translate this. See the GPT Translation Guide on how to achieve this.
  • Mail bot : visible email address for all outgoing mails.
  • Constituency name : local name for the constituencies of the election. I.e. for local elections, could be "city". This can too be translated.

GPT installation, step 6

Administrator account creation

Next step is to create an administrator account with global privileges.

The following parameters need to be set:

  • Username : login name for administrator account
  • Password : password for administrator account
  • Email : email for administrator account

GPT installation, step 7

Configuration file creation

Last step is to create the configuration file. Note that since GPT is run by the webserver user (www-data on Debian systems), it may not be able to successfully write its configuration file. In that case, GPT will produce an informational error message explaining how to set sufficient permissions.

GPT installation, step 8

Another possibility is to download the configuration file (GPT provides a link) and to manually put it in the webserver file system, in gpt/include/options.php.

Once everything is correct, you will see the following message.

GPT installation, step 9

Your new GPT powered website is now ready! Just click on the link and see the front page:

GPT installation, step 10

What now?

You are now ready to configure your GPT installation and populate it with data. Please use the GPT Administration Guide for more information.