|
|
This installation requires that the computer have a web server, Perl and MySQL
installed. Linux and OS X distributions most likely have Perl and Apache
already 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.
|
-
Download and install Apache
web server.
-
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 httpd.conf in any text
editor and add the following lines in the Alias section:
(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 ("/var/www/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 default directories for Apache web
files.
Alias /thegpm/ "/var/www/thegpm/"
<Directory "/var/www/thegpm">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /gpm/ "/var/www/thegpm/gpm/"
<Directory "/var/www/thegpm/gpm">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /tandem/ "/var/www/thegpm/tandem/"
<Directory "/var/www/thegpm/tandem">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /pics/ "/var/www/thegpm/pics/"
<Directory "/var/www/thegpm/pics">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /cache/ "/var/www/thegpm/cache/"
<Directory "/var/www/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/ "/var/www/thegpm/thegpm-cgi/"
<Directory "/var/www/thegpm/thegpm-cgi">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
-
Restart the Apache server:
[root@localhost root]# httpd -k restart
|
-
Download and install MySQL
production release (version 4.1.x at the time of writing).
-
Follow the instructions in the file called INSTALL-BINARY in the root mysql
directory.
-
For complete MySQL documentation see
here.
|
-
Download and install
ActiveState Perl.
-
It is recommended to install at /usr/bin/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.
-
Install the dbi and dbd perl modules needed for database communication. See
here and
here for pointers.
|
Once Perl, MySQL and Apache server have been installed and configured, the
database can be created.
-
Download the scripts and result collection here.
-
Extract the files to /var/www/, resulting in a folder called 'thegpm'.
-
Set the permissions on the folders and files as follows:
-
scripts: 755
-
scripts/*.pl: 755
-
thegpm-cgi: 777
-
thegpm-cgi/*.pl: 755
-
gpm: 777
-
gpm/uid.txt: 777
-
gpm/archive: 777
-
cache: 777
-
fasta: 755
-
pics: 755
-
tandem: 755
-
tandem/archive: 755
-
tandem/archive/pics: 755
-
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.
-
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 '/var/www/thegpm/gpm/archive/000/' and
'/var/www/thegpm/gpm/archive/'.
-
Open a command prompt and navigate to 'scripts' folder in 'thegpm' directory.
-
At the command prompt type mysql -u root. You should see the following:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1539 to server version: 4.0.17-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
-
Enter the following command:
mysql> source create_gpmdb.sql
-
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.
-
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'.
- Set the root password using mysqladmin:
From the same command prompt type \q to end the mysql session. And then type:
\thegpm\scripts> mysqladmin -u root password rootpass
-
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";
}
-
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.
|
-
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.
-
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.
-
Once the script has finished, there are a few things to finalize.
|
-
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.
-
Navigate to 'thegpm-cgi' folder and open the perl script called defines.pl.
Change the server name to the name of your server or leave as "localhost" if it
is only running locally.
sub get_server_name
{
return "localhost";
}
-
If you have GPM and GPMDB installed, you can change some of the navigation to
point to your local installation. Edit the file called gpmdb_nav.js found in
the /gpm/ folder. Change the value 'http://h.thegpm.org' to
'http://yourserver/thegpm_tandem.html'. Edit the file called mirrors.js found
in the tandem folder. Change the value 'http://gpmdb.proteome.ca' to
'http://yourserver/index.html'.
|
If you would like to add existing GPM results to GPMDB, follow the steps below:
-
Make a backup of existing results (just in case).
-
Move any existing results from '/thegpm/tandem/archive' to
'/thegpm/gpm/archive/'. With the new version of GPM, this is where the results
are stored.
-
Open a command prompt, navigate to 'thegpm/gpm/archive' and enter the command
below:
[root@localhost 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.
-
Open the file called uid.txt in 'thegpm/gpm/' folder and change the number to
the highest gpm number in /thegpm/gpm/archive/ folder.
-
Change directory of command prompt to c:\thegpm\scripts and enter the command
below:
[root@localhost 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.
|
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');
|
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
|
|