Pachyderm 2.0.5 Installation Instructions for Windows – DRAFT 1.0 – Author: Cynthia Walters cynthia.walters@virginia.edu Contributors: Joshua Archer, Scott Sayre, Rachel Smith, Craig Smith DRAFT 1.0 Table of Contents 1 2 3 4 5 6 7 8 Introduction ............................................................................................................................. 3 Assumptions............................................................................................................................ 3 Prerequisite Software .............................................................................................................. 3 3.1 Microsoft .NET 2.0 framework (Windows platform only)............................................. 3 3.2 Java Runtime Environment ............................................................................................. 4 3.3 MySQL ........................................................................................................................... 4 3.4 Apache ............................................................................................................................ 5 3.5 ImageMagick .................................................................................................................. 5 Optional Software ................................................................................................................... 5 4.1 MySQL GUI Tools (Admin, Query Browser, Migration Tool) .................................... 5 Install Pachyderm Files ........................................................................................................... 5 5.1 Pachyderm Product Files ................................................................................................ 6 5.2 Others: Apache, OsidProviders, ImageMagick, Database .............................................. 6 5.2.1 OsidProviders.......................................................................................................... 6 5.2.2 Apache Product, Pachyderm Support Files ............................................................ 6 5.2.3 ImageMagick .......................................................................................................... 7 5.2.4 Database load file .................................................................................................... 7 5.3 Pachyderm Service Files ................................................................................................. 7 Pachyderm Database Setup Tasks .......................................................................................... 8 6.1 Setup MySQL Database for Pachyderm Use .................................................................. 8 6.1.1 Connect to Database ............................................................................................... 8 6.1.2 Create “pachyderm” Database User........................................................................ 8 6.1.3 Create “pachyderm” Database Schema .................................................................. 8 6.1.4 Set Permissions for the “pachyderm” User ............................................................. 9 6.1.5 Create Database Tables and Load Pachyderm Data (Windows) ............................ 9 Configure Apache Web Server for Pachyderm Use ............................................................. 11 7.1 Apache Configuration File ............................................................................................ 11 7.2 Apache index.html File ................................................................................................. 13 Install Pachyderm Windows Service .................................................................................... 13 DRAFT 1.0 Page 2 of 14 As of: 2/15/2016 DRAFT 1.0 Pachyderm 2.0.5 Installation Instructions for Windows 1 Introduction Note: This document is an attempt to provide instrucitons for installing a Pachyderm system, based on a collaborative effort with Scott Sayre, Joshua Archer and Cynthia Walters, to test updated files and templates to produce a possibly “final” version of Pachyderm 2.0.x. The 2.0.5 release of Pachyderm does not include an installer program. This document attempts to guide the efforts of installing Pachyderm 2.0.5 on a Windows Server. It is recommended that a system administrator or developer perform the installation and configuration of Pachyderm and the prerequisite products. Future releases of Pachyderm include plans to greatly ease the installation process. 2 Assumptions o Operating System: Windows Server 2003 or Windows XP o None of the required software has been installed on the system. o Software should be installed by a system administrator or developer with Administrator rights on the server. o The system of installation is on the network and has a DNS domain name and/or a static IP address. 3 Prerequisite Software Pachyderm requires several other software packages to be installed. They are described in this section. 3.1 Microsoft .NET 2.0 framework (Windows platform only) First, check to see if any Windows updates are needed, and if so, download and install these. If the Microsoft .NET 2.0 framework is not currently installed, install it. o Check for it in the list of the “Add or Remove Programs” window, typically accessed from the Control Panel. Download it from Microsoft (www.microsoft.com/downloads -- option #3) [22.4 MB] Install it according to the wizard using the defaults suggested. DRAFT 1.0 Page 3 of 14 As of: 2/15/2016 DRAFT 1.0 3.2 Java Runtime Environment Install the latest Windows version of Java Runtime Environment version 5, including the for “Support for Additional Languages” and “Additional Font and Media Support”. Download from: http://java.sun.com/javase/downloads/ For example: jre-1_5_0_14-windows-i586-p.exe Save the executable and double-click on it to install it. 3.3 MySQL http://dev.mysql.com/downloads/ -- download the free Community Server GA Release, version 5.0. Choose: o “Typical” setup type o Detailed Configuration (default) o Server Machine for server type (not default) o Multifunctional Database for database usage (default) o InnoDB Tablespace Settings – may want to change to use different drive for datafiles (\MySQL Datafiles\), if the system has multiple drives o Online Transaction Processing chosen for concurrent connections up to 500 (not default) o Enable TCP/IP Networking on port 3306 (default) o Standard character set (Latin1) for English & Western European Languages chosen (default) – not sure if Pachyderm tested with UTF8 character set? o Install as a Windows Service, service name “MySQL”, Launch automatically – all chosen (defaults); plus check “Include Bin directory in Windows PATH (not default) o Password: pach=derm -- don't enable root access from remote machines; don't create anonymous accounts Before “Execute” of the Configuration Wizard: o Add MySQL Port to accepted firewall list: o Start, Setttings, Control Panel, Windows Firewall – go to "Exceptions" tab and select the "Add Port..." button, which opens a dialog where you can enter "MySQL", port 3306 for TCP o Disable Virus Protection for your system (temporarily) Back at config wizard, Execute. Re-enable virus protection. DRAFT 1.0 Page 4 of 14 As of: 2/15/2016 DRAFT 1.0 3.4 Apache Download the Win32 Binary from: http://httpd.apache.org You may be asked for: o Domain name, o Server name, o Administrator’s email address. Install for : o ALL users, o Port 80, o as a service. Perform a “Typical” installation. 3.5 ImageMagick Download from: http://www.imagemagick.org/ Note: I found that for Windows platform I needed to modify source (PXFoundation JAR) and use older versions of ImageMagick’s ‘convert’ tool (6.2.7-5-Q16 or 6.2.9-Q16 worked), but this was related to using Pachyderm to access remote repositories. One of these ImageMagick versions is included in the pachySupport.zip file mentioned later in this document. Installation: o Accept defaults; o do not need to install additional support software. Follow instructions to test that it is working by using logo.miff file. 4 Optional Software Additional software may be installed, if desired. 4.1 MySQL GUI Tools (Admin, Query Browser, Migration Tool) Download the Admin Tool Pack from: http://dev.mysql.com/downloads/gui-tools Install, accepting defaults. 5 Install Pachyderm Files At this point, there is not a Windows installer, so files from the following ZIP files can be extracted and moved into the correct locations. DRAFT 1.0 Page 5 of 14 As of: 2/15/2016 DRAFT 1.0 o Pachyderm.zip o pachySupport.zip o pachyServiceFiles.zip Details for each of these follows. 5.1 Pachyderm Product Files Unzip Pachyderm.zip file, extracting files into: C:\Program Files\ 5.2 Others: Apache, OsidProviders, ImageMagick, Database Unzip the pachySupport.zip file, extracting files into some temporary directory. There are three support components here: o C-Library-OsidProviders o Apache o ImageMagick o Database Details are noted in the following sections. 5.2.1 OsidProviders Copy the contents of ‘C-Library-OsidProviders\’ into a directory named: C:\Library\OsidProviders\ This directory contains configuration files that enable Pachyderm to access a demonstration collection (Black Ships and Samurai) which is a remote repository of images and metadata. 5.2.2 Apache Product, Pachyderm Support Files After following the instructions in the prerequisite software section (above), you should have an Apache install location, for example: C:\Program Files\Apache Software Foundation\Apache2.2\ See the included ‘readme.txt’ file. Also see the section in this document about the Apache web server config for Pachyderm. Changes described in that section for the ‘conf\httpd.conf’ and DRAFT 1.0 Page 6 of 14 As of: 2/15/2016 DRAFT 1.0 ‘htdocs\index.html’ files have been made in the included files which are taken from a working Pachyderm 2.0.5 installation. (Note: Some server-specific information is required, but you may be able to use the included files as a starting point and/or reference point.) Copy from the unzipped Apache temporary location: o The ‘pachyderm\’ and ‘resources\’ directories and contents need to be copied into your Apache ‘htdocs\’ directory. 5.2.3 ImageMagick This directory contains two versions of the PXFoundation.jar, but a working version should already exist in the Pachyderm.zip file, for the PXFoundation Framework. These files are provided as backup. This directory also contains a version of ImageMagick that can be installed on a Windows system and is known to work with this version of Pachyderm. If you have already installed another version of ImageMagick, you can uninstall and install this version. This version seems to be needed for the IM ‘convert’ tool to work correctly when Pachyderm creates thumbnails and smaller versions of JPG files, in the case of accessing remote repositories (i.e., sources other than the installed MySQL instance used by Pachyderm). Note: if you change the version of your installed ImageMagick product, you must also update the Pachyderm MySQL database ‘apdefault’ table value that specifies the version (location) for the ‘convert.exe’ tool. See the section in this document that describes configuring the database ‘apdefault’ table values. 5.2.4 Database load file A “Database” directory contains a SQL file to load the ‘pachyderm’ MySQL database. A ‘Mac’ and ‘Windows’ version are included; the main difference is the file sysem paths. Both versions may be used for Windows, but there are file paths in the Mac version that are incorrect for a Windows Pachyderm installation, and would need to be modified afterwards if these tables and data are loaded. Refer to the section, below, for information about loading the ‘pachyderm’ database using one of these files. 5.3 Pachyderm Service Files Unzip the ‘pachyServiceFiles.zip’ file into this location: C:\Program Files\Pachyderm\ DRAFT 1.0 Page 7 of 14 As of: 2/15/2016 DRAFT 1.0 Instructions for installing the Pachyderm service are found later in this document. 6 Pachyderm Database Setup Tasks Pachyderm makes use of a MySQL database for correct operation. These instructions assume that the MySQL Admin Tools are installed and available. 6.1 Setup MySQL Database for Pachyderm Use 6.1.1 Connect to Database Go to Start Menu > All Programs > MySQL > MySQL Administrator o Use the following values: o Stored Connection: (leave blank) o Server Host: localhost o Port: 3306 o Username: root o Password: pach=derm o Click OK. o A window will open. It should say: MySQL server is running. Leave this window open and proceed to the next step. 6.1.2 Create “pachyderm” Database User Use the MySQL Administrator tool (see previous step) o Click User Administration in the menu on the left. o Click the "Add New User" button at the bottom. This will open the fields for you to edit them. o MySQL User: pachyderm o Password: pach=derm o Click "Apply Changes" at the bottom. o Close the window to quit the GUI tool. This establishes “pachyderm” as a user for the database you will set up in the next step. 6.1.3 Create “pachyderm” Database Schema Go to Start Menu > All Programs > MySQL > MySQL Query Browser Connection Settings: o Server Host: localhost DRAFT 1.0 Page 8 of 14 As of: 2/15/2016 DRAFT 1.0 Port: 3306 Username: root Password: pach=derm Click OK. If you see a warning that there is no schema, Check "Don't Show Again," then click OK on the warning and again on the dialog box. In the new window that opens, right click in a blank spot in the Schemata panel on the right. o Select "Create new schema" o Name: pachyderm o Click OK o o o 6.1.4 Set Permissions for the “pachyderm” User Go to Start Menu > All Programs > MySQL > MySQL Administrator o o o o o Click "pachyderm" in the Users list on the left. Click "Schema Privileges" tab at the top. Click " pachyderm " in Schemata list. You will see a large list of available privileges. Click the "<<" button to move them all over into "assigned privileges" for the user “pachyderm”. Click the "Apply Changes" button at the bottom. This gives user “pachyderm” permission to access the database you set up in a previous step. 6.1.5 Create Database Tables and Load Pachyderm Data (Windows) A SQL file that creates and populates the pachyderm database is included in the ‘pachySupport.zip’ file (see the section, above, on Pachyderm Product Files). We will assume you have extracted the Windows version of the file into C:\Temp. 6.1.5.1 Execute the Database Load Script Given an SQL file (we will assume C:\Temp\pachyfinal-202.sql): Open a Windows cmd window (Start --> Run --> cmd ) Change to the directory where the MySQL binary files exist. For example, this may be the following standard installation location: C:\Program Files\MySQL\MySQL Server 5.0\bin So, the command you enter would be: cd C:\Program Files\MySQL\MySQL Server 5.0\bin DRAFT 1.0 Page 9 of 14 As of: 2/15/2016 DRAFT 1.0 Next, run the command to load the sql dump file into the “pachyderm” user’s database. (The example assumes the file is in the C:\Temp directory.) mysql –u pachyderm -p pachyderm < "C:\Temp\pachyfinal-202.sql” You may be prompted for the “pachyderm” user’s password. Type the password: pach=derm Press Enter key. 6.1.5.2 Update DB Values for Your Server Some data in the “pachyderm” schema needs to be adjusted to be specific to the server machine that Pachyderm is installed on. You need to provide the fully qualified DNS name for the server (preferred), or the machine’s IP address. You also need to specify the installed location for the ImageMagick ‘convert.exe’ program. Note: it would be nice to have an update script to run, and it may be this level of configuration is not required for future Pachyderm releases, but for now we need to manually configure database values. The following updates are needed to the ‘apdefault’ table: Configure the VALUE for following three (3) fields (look under DKEY column) to use your machine’s DNS name. o AssetUploadURL o PublishedPresentationURL o InstanceHostname (change localhost to your DNS name) Ensure the VALUE for this field matches your ImageMagick installation location: o ImageMagickConvertPath For example, the value may be this (include the quotes and double slashes): “C:\\Program Files\\ImageMagick-6.2.7-Q16\\convert.exe” Ensure the VALUE (path) for each of the following DKEYs is correct for your server. Each specifies the location of the Apache ‘htdocs’ directory. o o o o AssetUploadDirectory PublishedPresentationDirectory FlashTemplateDirectory AssetThumbnailWebpath Note: see the ‘apdefault202.html’ file for an example of this table’s content. DRAFT 1.0 Page 10 of 14 As of: 2/15/2016 DRAFT 1.0 One way to update the DB values is to use the MySQL Query Browser tool. From the MySQL Administrator "Tools" menu, open MySQL Query Browser. On the far right "Schemata" tab, double-click on the pachyderm database to see tables list. Double-click on the "apdefault" table to generate a SELECT statement; choose the "Execute" button to run the query. To get into Edit mode, choose the "Edit" button found on the bottom of the screen. Then, to change a value, double-click on the field to get an empty text field where you can paste the new value; hit Return. Choose "Apply Changes" button at the bottom of the screen to save the update. 7 Configure Apache Web Server for Pachyderm Use 7.1 Apache Configuration File Modifications to the Apache Configuration file are required. You may be able to use the version found in the ‘pachySupport.zip’ file, or you may choose to modify your current version of the file as described below. The Apache config file is found here (for Apache 2.2): C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf o Make a backup copy of the httpd.conf file. o Stop the Apache web service: Start Programs Apache HTTP Server 2.2 Control Apache Server Stop o Edit the httpd.conf file and ensure the following items are configured as described here. Set ServerRoot to Apache install location: For example: ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2" Listen on port 80: Listen 80 Set ServerAdmin to local email address: (Pick an email address to use.) DRAFT 1.0 Page 11 of 14 As of: 2/15/2016 DRAFT 1.0 Set ServerName to registered DNS name or IP address Set DocumentRoot to Apache’s htdocs location: DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" Set Directory to same value as DocumentRoot: <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"> Make sure the following lines are uncommented: LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so Add these lines to the end of the httpd.conf config file: ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /cgi-bin/WebObjects/Pachyderm2.woa http://localhost:8000/cgi-bin/WebObjects/Pachyderm2.woa ProxyPassReverse /cgi-bin/WebObjects/Pachyderm2.woa http://localhost:8000/cgi-bin/WebObjects/Pachyderm2.woa o Restart the Apache Web Server Start Programs Apache HTTP Server 2.2 Control Apache Server Start o Test the new configuration Start Programs Apache HTTP Server 2.2 Configure Apache Server Test configuration o Test Pachyderm: Open a browser window and type the following addess: http://localhost DRAFT 1.0 Page 12 of 14 As of: 2/15/2016 DRAFT 1.0 You should see the Pachyderm application appear displaying the welcome message, along with log-in fields. You should be able to login with “administrator” and “pachyderm”. 7.2 Apache index.html File o Make a backup copy of the index.html file, found in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\. o Edit the Apache index.html file, and put the following lines in it: <html> <meta http-equiv="refresh" content="0;/cgi-bin/WebObjects/Pachyderm2.woa"> </html> 8 Install Pachyderm Windows Service Follow these steps to install the Pachyderm Windows Service. o Step 1: Run the installer that is in the Services folder: Double-click on C:\Program Files\Pachyderm\Service Files\install.bat file o Step 2: Create a directory called "logs" in the Pachyderm folder. DRAFT 1.0 Page 13 of 14 As of: 2/15/2016 DRAFT 1.0 o Step 3: Restart the server o Step 4: Go to the Services control panel and start Pachyderm. Note: if you want the Pacyderm service to start whenever the server restarts, you can use the Services interface to set the Pachyderm service properties to use “Automatic” startup. DRAFT 1.0 Page 14 of 14 As of: 2/15/2016