(→Perl) |
|||
Line 17: | Line 17: | ||
**Or, ftp://ftp.thegpm.org/projects/localgpm/apache-perl-mysql.zip This is a single archive file which contains Apache HTTP Server 2.2.15, ActiveState Perl 5.10.1.1007 and MySQL Server 5.1.48. After downloading, extract the three setup files to a temporary location; you will not need them after installation is complete. | **Or, ftp://ftp.thegpm.org/projects/localgpm/apache-perl-mysql.zip This is a single archive file which contains Apache HTTP Server 2.2.15, ActiveState Perl 5.10.1.1007 and MySQL Server 5.1.48. After downloading, extract the three setup files to a temporary location; you will not need them after installation is complete. | ||
- | == | + | == Installation == |
*Extract the contents of gpm-software.zip to the location you have chosen. E.g., if the '''E:''' drive on your computer has the free space an installation will require, extract gpm-software.zip to '''E:\'''. This will create the necessary directory structure and place the scripts required to display information. | *Extract the contents of gpm-software.zip to the location you have chosen. E.g., if the '''E:''' drive on your computer has the free space an installation will require, extract gpm-software.zip to '''E:\'''. This will create the necessary directory structure and place the scripts required to display information. | ||
- | === Apache === | + | === Apache Installation === |
#Locate and start the installer, called '''httpd-2.2.15-win32-x86-openssl-0.9.8m-r2.msi''') | #Locate and start the installer, called '''httpd-2.2.15-win32-x86-openssl-0.9.8m-r2.msi''') | ||
#"Network domain" value should be the same as the end of the target computer's DNS name; e.g., if the target computer has a DNS entry of "science14.med.university.edu", enter "med.university.edu". If you need assistance with this step, contact your local support. | #"Network domain" value should be the same as the end of the target computer's DNS name; e.g., if the target computer has a DNS entry of "science14.med.university.edu", enter "med.university.edu". If you need assistance with this step, contact your local support. | ||
Line 27: | Line 27: | ||
#Use a "Typical" installation. | #Use a "Typical" installation. | ||
#Let installation complete. | #Let installation complete. | ||
- | === Perl === | + | === Perl Installation === |
#Locate the installer called '''ActivePerl-5.10.1.1007-MSWin32-x86-291969.msi''') | #Locate the installer called '''ActivePerl-5.10.1.1007-MSWin32-x86-291969.msi''') | ||
#Choose a "typical" install using the recommended settings. | #Choose a "typical" install using the recommended settings. | ||
- | === MySQL === | + | === MySQL Installation === |
#Choose a "Typical" install. | #Choose a "Typical" install. | ||
#Choose "Configure the MySQL Server now". | #Choose "Configure the MySQL Server now". | ||
Line 40: | Line 40: | ||
##Enter a root password. Remember this password, as it will be needed later. Complete the configuration. | ##Enter a root password. Remember this password, as it will be needed later. Complete the configuration. | ||
- | == | + | == Configuration == |
- | === Apache === | + | === Apache Configuration === |
#Navigate to the Apache installation directory ('''C:\Program Files\Apache Software Foundation\Apache2.2''' by default). Go into the '''conf''' directory. Make a backup copy of httpd.conf. | #Navigate to the Apache installation directory ('''C:\Program Files\Apache Software Foundation\Apache2.2''' by default). Go into the '''conf''' directory. Make a backup copy of httpd.conf. | ||
#Edit httpd.conf as follows: | #Edit httpd.conf as follows: | ||
Line 48: | Line 48: | ||
##In the section marked "<IfModule alias_module>", modify the ScriptAlias value, based off wherever you extracted gpm-software.zip. Make the line read: <tt>ScriptAlias /thegpm-cgi/ "<base_path>/thegpm/thegpm-cgi/"</tt>, where '''<base_path>''' stands for the path in which you extracted gpm-software.zip. E.g., if you installed to ''''E:\''', write '''"E:/thegpm/thegpm-cgi/"'''; if you installed to '''"D:/websites/"''', write '''"D:/websites/thegpm/thegpm-cgi/"'''. | ##In the section marked "<IfModule alias_module>", modify the ScriptAlias value, based off wherever you extracted gpm-software.zip. Make the line read: <tt>ScriptAlias /thegpm-cgi/ "<base_path>/thegpm/thegpm-cgi/"</tt>, where '''<base_path>''' stands for the path in which you extracted gpm-software.zip. E.g., if you installed to ''''E:\''', write '''"E:/thegpm/thegpm-cgi/"'''; if you installed to '''"D:/websites/"''', write '''"D:/websites/thegpm/thegpm-cgi/"'''. | ||
#Save the changes and restart the Apache server. If it fails to start, use the command-line Apache tool: "<tt>apachectl configtest</tt>" in the '''/bin/''' folder of the Apache install directory. | #Save the changes and restart the Apache server. If it fails to start, use the command-line Apache tool: "<tt>apachectl configtest</tt>" in the '''/bin/''' folder of the Apache install directory. | ||
- | === MySQL === | + | === MySQL Configuration === |
#Stop the MySQL service. Go to the installation directory of MySQL. Make a backup copy of the my.ini file. Open the my.ini file and locate the <tt>datadir</tt> value. | #Stop the MySQL service. Go to the installation directory of MySQL. Make a backup copy of the my.ini file. Open the my.ini file and locate the <tt>datadir</tt> value. | ||
#Navigate to the default data directory specified in the <tt>datadir</tt> directory, and copy all contents of the default data folder (including all subfolders) to '''<base_path>/gpmdb/data/''', where '''<base_path>''' is where the gpm-software.zip archive was extracted. | #Navigate to the default data directory specified in the <tt>datadir</tt> directory, and copy all contents of the default data folder (including all subfolders) to '''<base_path>/gpmdb/data/''', where '''<base_path>''' is where the gpm-software.zip archive was extracted. | ||
#Update the <tt>datadir</tt> value in the my.ini file to read <tt>datadir="<base_path>/gpmdb/data/"</tt>, including the double quotes, where '''<base_path>''' is where the gpm-software.zip archive was extracted. | #Update the <tt>datadir</tt> value in the my.ini file to read <tt>datadir="<base_path>/gpmdb/data/"</tt>, including the double quotes, where '''<base_path>''' is where the gpm-software.zip archive was extracted. | ||
#Save the file and restart the MySQL service. | #Save the file and restart the MySQL service. | ||
- | === Perl === | + | === Perl Configuration === |
#Navigate to the Perl '''\bin\''' directory (by default, this is '''c:\perl\bin\'''). | #Navigate to the Perl '''\bin\''' directory (by default, this is '''c:\perl\bin\'''). | ||
#Run the command <tt>ppm</tt>. This will start the Perl Package Manager. | #Run the command <tt>ppm</tt>. This will start the Perl Package Manager. | ||
#Display all packages. | #Display all packages. | ||
#In the search box, type <tt>dbd-mysql</tt>. Choose the resulting package, install it, then exit Perl Package Manager. | #In the search box, type <tt>dbd-mysql</tt>. Choose the resulting package, install it, then exit Perl Package Manager. | ||
- | + | === Script Configuration === | |
- | === | + | |
#Run the script to edit the path information for all the Perl scripts used. Start a command-line window, and navigate to '''\thegpm\scripts\''' directory. Run the script '''local_gpm_pathmod.pl''' by typing <tt>perl local_gpm_pathmod.pl <base_path>/thegpm/</tt> where <base_path> is the path to where the gpm-software.zip archive was extracted. Ensure you use front slashes (/) instead of back slashes (\) when typing the path. This will edit scripts in both '''\thegpm\scripts\''' and '''\thegpm\thegpm-cgi\'''. | #Run the script to edit the path information for all the Perl scripts used. Start a command-line window, and navigate to '''\thegpm\scripts\''' directory. Run the script '''local_gpm_pathmod.pl''' by typing <tt>perl local_gpm_pathmod.pl <base_path>/thegpm/</tt> where <base_path> is the path to where the gpm-software.zip archive was extracted. Ensure you use front slashes (/) instead of back slashes (\) when typing the path. This will edit scripts in both '''\thegpm\scripts\''' and '''\thegpm\thegpm-cgi\'''. | ||
#In the '''\thegpm\thegpm-cgi\''' directory, edit the hurricane.cfg file. | #In the '''\thegpm\thegpm-cgi\''' directory, edit the hurricane.cfg file. | ||
##This needs details. | ##This needs details. | ||
- | #Edit the '''\thegpm\thegpm-cgi\dbcommon.pl''' file. | + | #Edit the '''\thegpm\thegpm-cgi\dbcommon.pl''' file. In the functions GetUser() and GetPass() define a username and password for the read-only database user (default values are readuser/readpass). In the functions GetRUser() and GetRPass(), do the same for the read/write user (default values are writeuser/writepass). ''Do not skip this step''; the integrity of the database depends on it. Also, it is NOT recommended to use the root username and password you defined during MySQL setup in the '''dbcommon.pl''' file. |
#Edit the '''\thegpm\thegpm-cgi\defines.pl''' file. | #Edit the '''\thegpm\thegpm-cgi\defines.pl''' file. | ||
- | # | + | ##get_server_name() function: enter the DNS name of the server as the value. |
- | ##Log into MySQL as the root user you defined during its installation. Then, type: <tt>source <base_path>/thegpm/scripts/create_localgpm_databases_tables.sql;</tt>. This will create the GPMDB database and table structure that will be populated after data files are submitted to the identification software. | + | ##get_gpm_number() function: enter "GPMnnn", where "nnn" is three numerals. |
- | #Schedule the execution of the '''\thegpm\scripts\popGPMDB.pl''' script, which parses the XML files created by the search software and adds them to the database. | + | === Database Configuration === |
+ | *Log into MySQL as the root user you defined during its installation. Then, type: <tt>source <base_path>/thegpm/scripts/create_localgpm_databases_tables.sql;</tt>. This will create the GPMDB database and table structure that will be populated after data files are submitted to the identification software. | ||
+ | *Edit the file '''\gpmdb\create_local_gpmdb_users.sql''' to define the username and password for both a read-only user and a root-like user. They must match what you entered as the usernames and passwords in the '''\thegpm\thegpm-cgi\dbcommon.pl''' file. | ||
+ | === Automation Configuration === | ||
+ | #Schedule the execution of the '''\thegpm\scripts\popGPMDB.pl''' script, which parses the XML files created by the search software and adds them to the database. This can be done in the Windows Control Panel, under Scheduled Tasks. |
Contents |