The Global Proteome Machine Organization
   GPMDB Windows Installation

This installation requires that the computer have a web server, Perl and MySQL installed. The first three sections explain how to install and configure these items before GPMDB is installed. If these items are installed already, there will be some configuration to do, so make sure you read all sections before installing GPMDB.

If you already have GPM installed, you will already have Apache and Perl installed. Also, you will only need to add the aliases for 'thegpm' and 'gpm' (the first two below) making sure that the paths are the same as where you currently have GPM installed. There are a couple of other things that are done differently if GPM is already installed and will be noted as we go along.

It's important to note that the directory structures of GPM and GPMDB are the same, but the contents are only similar. Be careful to copy contents of folders as opposed to entire folders if merging the two systems.

   Web Server

  1. Download and install Apache web server.
  2. Apache is configured using an ascii text file called httpd.conf which is stored in the /etc/bin/httpd folder. The only thing you really need to tell Apache is where your web accessible files are using Aliases. Open the file called httpd.conf found in the Apache2/conf folder. Add the following lines in the Alias section.


  3. (hints: 1. search for the text string 'Aliases:' to find Alias section easily in httpd.conf. 2. If you don't have any GPM software installed previously, the paths below ("C:/thegpm/tandem/" etc) will not exist yet, but will be created after GPMDB is downloaded. 3. GPMDB can be installed anywhere on the machine. The paths given are simply the best suggestion.

    	Alias /thegpm/ "C:/thegpm/"
    	<Directory "C:/thegpm">
    	    Options Indexes MultiViews
    	    AllowOverride None
    	    Order allow,deny
    	    Allow from all
    	</Directory>
    	
    	Alias /gpm/ "C:/thegpm/gpm/"
    	<Directory "C:/thegpm/gpm">
    	    Options Indexes MultiViews
    	    AllowOverride None
    	    Order allow,deny
    	    Allow from all
    	</Directory>
    
    	Alias /tandem/ "C:/thegpm/tandem/"
    	<Directory "C:/thegpm/tandem">
    	    Options Indexes MultiViews
    	    AllowOverride None
    	    Order allow,deny
    	    Allow from all
    	</Directory>
    	
    	Alias /pics/ "C:/thegpm/pics/"
    	<Directory "C:/thegpm/pics">
    	    Options Indexes MultiViews
    	    AllowOverride None
    	    Order allow,deny
    	    Allow from all
    	</Directory>
    	
    	Alias /cache/ "C:/thegpm/cache/"
    	<Directory "C:/thegpm/cache">
    	    Options Indexes MultiViews
    	    AllowOverride None
    	    Order allow,deny
    	    Allow from all
    	</Directory>
    	
    	Alias /styles/ "C:/thegpm/styles/"
    	<Directory "C:/thegpm/styles">
    	    Options Indexes MultiViews
    	    AllowOverride None
    	    Order allow,deny
    	    Allow from all
    	</Directory>
    	
    	ScriptAlias /thegpm-cgi/ "C:/thegpm/thegpm-cgi/"
    	
    	<Directory "C:/thegpm/thegpm-cgi">
    	    AllowOverride None
    	    Options None
    	    Order allow,deny
    	    Allow from all
    	</Directory>
    	
    
  4. Restart the Apache server.

   MySQL

  1. Download and install MySQL production release (version 4.1.x at the time of writing).
  2. You may have to add c:\mysql\bin to the path environment variable and restart.
  3. You may have to add mysqld to services.
  4. For pointers see here.
  5. For complete MySQL documentation see here.

   Perl

If you already have GPM installed, skip to step 3.

  1. Download and install ActiveState Perl.
  2. It is recommended to install at c:\perl if possible as the perl scripts expect to find the perl executable there. If installed somewhere else, the first line of each perl script will need to be changed to point to the correct location of perl.
  3. Install the dbi and dbd perl modules needed for database communication. See here for pointers or enter the commands below at the command prompt.

  4. 										
    	c:\> cd perl\bin
    	c:\perl\bin> ppm
    	ppm> install DBI
    	ppm> install http://theoryx5.uwinnipeg.ca/ppms/DBD-mysql.ppd
    	
    
    If you get an error stating that the perl versions don't match, try:
    	ppm> install DBD-mysql
    	
    

   Database Creation
Once Perl, MySQL and Apache server have been installed and configured, the database can be created.

  1. Download the most recent scripts and result collection here.
  2. Extract the files to the 'C' drive unless you have GPM installed there in which case extract to a temp folder, resulting in a folder called 'thegpm'.
  3. If you already have GPM installed, copy all the scripts from GPMDB thegpm-cgi into your GPM thegpm-cgi. Copy the 'scripts' folder, the html files and the javascript file to 'thegpm' directory your current GPM installation. This will overwrite the current index.html file, so users will now have to enter 'http://servername/tandem/thegpm_tandem.html' to get the GPM search page. Also, copy the contents of the 'gpm/archive' folder (not the entire folder, just the contents) from GPMDB to the archive folder of your GPM installation. This should not overwrite anything.
  4. Open the file called create_gpmdb.sql found in the 'scripts' folder. Change the value 'localhost' to your server's name or ip address in the INSERT statements at the end of the file. Also make sure the the values for 'localpath' are correct. By default they are 'C:/thegpm/gpm/archive/000/' and 'C:/thegpm/gpm/archive/'.
  5. Open a command prompt and navigate to 'scripts' folder in 'thegpm' directory.
  6. At the command prompt type mysql -u root. You should see the following:
    
    	Welcome to the MySQL monitor.  Commands end with ; or \g.
    		
    	Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    	
    
  7. Enter the following command:
    	
    	mysql> source create_gpmdb.sql
    	
    
  8. You should see the following:
    
    	Query OK, 0 rows affected (0.48 sec)
    	
    	Query OK, 1 row affected (0.00 sec)
    	
    	Database changed
    	Query OK, 0 rows affected (0.00 sec)
    	
    	Query OK, 0 rows affected (0.00 sec)
    
    	.....
    	
    	.....
    	
    	Query OK, 1 row affected (0.00 sec)
    
    
    An empty GPMDB has been created.
  9. Two new database users will have to be created. One that connects to the database using the web interface and one for database population purposes. Also, the root password needs to be set. Type the following commands at the mysql prompt:
    
    	mysql> GRANT USAGE ON gpmdb.* TO 'webuser'@'localhost' 
    			IDENTIFIED BY 'webpass';
    
    	mysql> GRANT ALL PRIVILEGES ON gpmdb.* TO 'popuser'@'localhost' 
    			IDENTIFIED BY 'poppass';
    	
    	mysql> FLUSH PRIVILEGES;
    
    
    where 'webuser' is the name of the web user and 'webpass' is the password for the web user. Likewise for 'popuser' and 'poppass'.
  10. Set the root password using mysqladmin:
    From the same command prompt type \q to end the mysql session. And then type:

  11. 	\thegpm\scripts> mysqladmin -u root password rootpass
    
  12. Open the perl script called dbcommon.pl and edit the names and passwords you used in the GRANT statements above:
    
    	sub GetPass(){
    		return "webpass";
    	}
    	
    	sub GetUser(){
    		return "webuser";
    	}
    
    	sub GetRPass(){
    		return "poppass";
    	}
    	
    	sub GetRUser(){
    		return "popuser";
    	}
    
    
  13. The next step is to populate the database with the result collection. It is important that the creation script is not run again once the database has been populated, unless you wish to start fresh, as it will delete and recreate an empty database. The population script on the other hand will add new results without affecting the current data.

   Database population

  1. Edit the file processArchive.pl. Change the follwing line:
    
    	my $update_period = 3600*32;
    	to
    	my $update_period = 3600*24*1000;
    
    
    This tells the script to process files less than 1000 days old. After the script is run for the first time, change 1000 to the number of days between each population that you plan to do.
  2. Enter the command:
    
    	\thegpm\scripts>perl processArchives.pl
    
    
    This will process the files in each folder in the Paths table and add the data to GPMDB.
  3. Once the script has finished, there are a few things to finalize.

   Finalize

  1. Remove the default users from the mysql database as they do not require authentication and this is a potential security risk. Type the following commands at the mysql prompt.
    
    	mysql> \u mysql
    	mysql> DELETE FROM user WHERE User = '' OR Host = '%';
    	mysql> DELETE FROM db WHERE User = '';
    	mysql> FLUSH PRIVILEGES;
    
    
    Once this is done, you will not be able to start the mysql prompt without typing the user name and password as follows:
    
    	\thegpm\scripts> mysql -u popuser -ppoppass
    	or
    	\thegpm\scripts> mysql -u webuser -pwebpass
    	or
    	\thegpm\scripts> mysql -u root -prootpass
    	
    
    Note there is no space between '-p' and the password.
  2. Navigate to 'thegpm-cgi' folder and open the perl script called defines.pl. Change the server name to the name of your server or localhost if it is only running locally. Make sure get_gpm_number() returns "GPM001".

   Add existing GPM results
If you would like to add existing GPM results to GPMDB, follow the steps below:
  1. Make a backup of existing results (just in case).
  2. Move any existing results from '/thegpm/tandem/archive' to '/thegpm/gpm/archive/GPM001'. With the new version of GPM, this is where the results are stored.
  3. Open a command prompt, navigate to 'thegpm/gpm/archive' and enter the command below:
    
    	\thegpm\gpm\archive> perl rename_archives.pl
    	
    
    This will rename your existing files to GPM standard names. This step is optional, although file names with spaces or funny characters can be problematic for the database.
  4. Open the file called uid.txt in 'thegpm/gpm/' folder and change the number to the highest gpm number in GPM001 folder.
  5. Change directory of command prompt to \thegpm\scripts and enter the command below:
    
    	\thegpm\scripts> perl processArchives.pl
    	
    
    This will add your results to GPMDB, skipping over any that were added previously and may be run at any time to add new results.
   Use GPMDB
GPMDB is now ready to use. Point your browser to http://servername/thegpm/index.html. You should see GPMDB search start page. Click on one of the example links to test your installation.
If you get the error:

'Client does not support authentication protocol'


when trying to connect ot the database through the web interface, open the mysql command and type the following:

mysql>SET PASSWORD FOR 'webuser'@'localhost' = OLD_PASSWORD('webpass');
   Getting help

This set of instructions is not a rigid formula: you may have to adjust the way it is installed based on existing web servers on your computer, or just to make it more convenient for you. If you have any problems or questions us.


Copyright © 2004, The Global Proteome Machine Organization