Installing on Windows Server 2003 64-bit

From ResourceSpace Documentation Wiki
Revision as of 17:50, 7 September 2010 by Techpatriot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This guide covers installing ResourceSpace on Windows Server 2003 64-bit with IIS, PHP FastCGI, and MySQL. It is intended to get you started with a basic installation of ResourceSpace.

General Windows settings

Disable the Windows Firewall.

Assign the server a static IP address.

Log in as a user who is a member of the local administrators's group.

Misc software installs

Install the latest versions of both Sun (Oracle) Java 32-bit AND Java 64-bit for Windows: (http://www.java.com/en/download/manual.jsp)

Install the latest version of Adobe Flash: (http://get.adobe.com/flashplayer/)

Install both the 32-bit AND 64-bit versions of Microsoft Visual C++ 2008 Redistributable Package. This is necessary for ImageMagick and FastCGI functionality:

(32-bit) http://www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF
(64-bit) http://www.microsoft.com/downloads/details.aspx?familyid=bd2a6171-e2d6-4230-b809-9a8d7548c1b6

Install IIS components

  1. Navigate to the Control Panel and open the "Add or Remove Programs" group.
  2. Click "Add/Remove Windows Components" button.
  3. Uncheck the box next to "Internet Explorer Enhanced Security Configuration".
  4. Double-click "Application Server".
  5. Check the box next to "Internet Informations Services (IIS)" first then click the "Details" button.
  6. Check the box next to "SMTP Service". Click OK.
  7. Click OK.
  8. Click Next.
    Note: You may need to insert the Windows Server 2003 installation media.
  9. Click Finish.

Configure IUSR anonymous user account access to cmd.exe

In order for external tools such as ImageMagick and FFMpeg to work properly you must configure IUSR user account access to cmd.exe. From a command line, execute the following command:

Note: Replace "MYPC" with the name of your machine.

cacls c:\windows\system32\cmd.exe /E /G IUSR_MYPC:F

Install 7-zip

Download the 64-bit version from (http://www.7-zip.org/download.html)

  1. Run setup.
  2. Click Next.
  3. Accept the agreement. Click Next.
  4. Change the install directory to c:\7-zip. Click OK.
  5. Click Next.
  6. Click Install.
  7. Click Finish.

Install PHP

Download from (http://windows.php.net/download)

  1. Download the non thread safe VC9 zip file of PHP for Windows, not the installer (.MSI) version.
  2. Extract the zip file contents to the c:\php folder.
  3. Go to the c:\php folder and rename php.ini-production to php.ini.
  4. Open php.ini. At a minimum, uncomment and set the following values:
    Note: Adjust the max sizes and limits suitable for your server hardware configuration.
    short_open_tag = On
    memory_limit = 2000M
    error_log = "c:\windows\temp\php-errors.log"
    post_max_size = 1000M
    extension_dir = "c:\php\ext"
    cgi.force_redirect = 0
    fastcgi.impersonate = 1
    fastcgi.logging = 0
    upload_tmp_dir = "c:\windows\temp"
    upload_max_filesize = 1000M
    max_file_uploads = 5000
    default_socket_timeout = 60
    extension=php_exif.dll
    extension=php_gd2.dll
    extension=php_ldap.dll
    extension=php_mbstring.dll
    extension=php_mysql.dll
    SMTP = "mail server name"
    smtp_port = 25
    session.save_path = "c:\windows\temp"

Add the PHP folder to the system path environment variable

  1. Click the Start button -> Control Panel -> System
  2. Click the Advanced tab.
  3. Click the Environment Variables button.
  4. In the System Variables section, scroll down and double-click the Path variable entry.
  5. At the end of the Variable Value, type ";c:\php;c:\php\ext" without the quotes. Click OK three times.

Install FastCGI for IIS

Download the 64-bit version from (http://www.iis.net/download/fastcgi)

  1. Run setup.
  2. Click Next.
  3. Check the box next to "I accept the terms in the License Agreeent". Click Next.
  4. Click Install.
  5. Click Finish.

Register the PHP CGI program as an extension in IIS

  1. Open a command prompt.
  2. Change the current directory to %windir%\system32\inetsrv
  3. Run the following configuration script:
    cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe"

    OR, to configure FastCGI for only a specific IIS web site, run this instead:
    cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe" –site:1

Add index.php as a default content page in IIS

  1. Open Internet Information Services (IIS) Manager.
  2. Expand the local computer group in the left pane if it is not already.
  3. Right-click on "Web Sites" in the left pane, then click "Properties".
  4. On the "Documents" tab click the "Add..." button.
  5. Type "index.php" (without quotes) in the field and click OK.
  6. Select index.php in the list and click the "Move Up" button until it is at the top of the list. Click OK.
  7. If an "Inheritance Overrides" dialog box appears, click the "Select All" button to highlight all of the child nodes and then click OK.
  8. Right-click the computer name in IIS Manager. Navigate to "All Tasks" then "Restart IIS...". Make sure "Restart Internet Services on (computername)" is selected then click OK.

Test PHP functionality

  1. Open notepad.exe.
  2. Type the following code:
    <?php phpinfo();?>
  3. Save the file as test.php in the c:\inetpub\wwwroot folder.
  4. Open a web browser.
  5. Navigate to http://servername/test.php
  6. Verify the "PHP Version" page appears.

Install MySQL

Download from (http://www.mysql.com/downloads/mysql)

  1. Download the latest version of MySQL Community Server. There are several variants. Download the mysql-essential x64 version.
  2. Run the MySQL installer.
  3. Click Next.
  4. Choose "Custom". Click Next.
  5. Change the install folder location to c:\mysql. Click OK. Click Next.
  6. Click Install.
  7. Click Next.
  8. Click Next.
  9. Leave the "Configure the MySQL Server now" box checked. Uncheck the "Register the MySQL Server now" box, if there is one. Click Finish.
  10. Click Next.
  11. Choose "Detailed Configuration". Click Next.
  12. Choose "Developer Machine". Click Next.
  13. Choose "Non-Transactional Database Only". Click Next.
  14. Choose "Manual Setting". Change level of concurrent connections to 100. Click Next.
  15. Check the box for "Enable TCP/IP Networking". Choose 3306 for the port number. Check the box next to "Add firewall exception for this port". Uncheck the box for "Enable Strict Mode". Click Next.
  16. Choose "Standard Character Set". Click Next.
  17. Check the box for "Install As Windows Service". The default service name is fine. Check the box for "Launch the MySQL Server automatically". Check the box for "Include Bin Directory in Windows PATH". Click Next.
  18. Check the box for "Modify Security Settings". Type a password twice. Leave the other boxes unchecked. Click Next.
  19. Click Execute.
  20. Click Finish.

Install PHPMyAdmin

Download from (http://www.phpmyadmin.net/home_page/downloads.php)

  1. Extract the zip file contents to the c:\inetpub\wwwroot\phpmyadmin folder.
  2. Using WordPad (not Notepad), open config.sample.inc.php file from C:\inetpub\wwwroot\phpmyadmin
  3. Add or edit the following variables:
    $cfg['blowfish_secret'] = '84jfdfg5dmf40jdojf8949jf984';   # you can use any random string you want for the secret
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['host'] = '127.0.0.1';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['compress'] = false;
    $cfg['Servers'][$i]['extension'] = 'mysql';
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
  4. Save and rename the file as config.inc.php.
  5. Open Internet Explorer and navigate to http://(server IP)/phpmyadmin
  6. Login with "root" as the username and the same password used for the MySQL installation.

Create a database for ResourceSpace

  1. Open Internet Explorer and navigate to http://(server IP)/phpmyadmin
  2. Login with "root" as the username and the same password used for the MySQL installation.
  3. On the home page, click in the box underneath "Create new database". Type "resourcespace". The collation box can usually be left as is (saying "collation") or you can specify UTF8_general_ci collation. Click Create.
  4. On the following page, verify the database was successfully created.

Install ResourceSpace

Download from (http://www.resourcespace.org/download.php)

Extract the contents of the zip file to the c:\inetpub\wwwroot\resourcespace folder.

Configure IIS for ResourceSpace

  1. Open Internet Information Services (IIS) Manager.
  2. Navigate to servername - Application Pools on left.
  3. Right-click "Application Pools" and navigate to New -> Application Pool
  4. Type "ResourceSpace" for the Application pool ID. Click Ok.
  5. Right-click the new ResourceSpace application pool folder and choose Properties.
  6. On the Identity tab, click the drop-down menu next to "Predefined" and choose "Local System". Click OK. Click Yes for the warning.
  7. Navigate to "Web Sites" -> "Default Web Site" -> "resourcespace".
  8. Right-click "resourcespace" and choose Properties.
  9. Click the Create button. The box next to "Application Name" should now say "resourcespace".
  10. Click the drop-down menu next to "Application pool" and choose "ResourceSpace". Click OK.

Install ImageMagick

Download from (http://www.imagemagick.org/download/binaries)

  1. For a 64-bit Windows install, download the ImageMagick-6.6.1-10-Q16-windows-x64-static version or similar (build may be newer).
  2. Run setup.
  3. Click Next.
  4. Accept the agreement. Click Next.
  5. Click Next.
  6. Change the install directory to c:\imagemagick (all lowercase). Click Next.
  7. Click Next.
  8. Click Next.
  9. Click Install.
  10. Click Next.
  11. Uncheck the box next to "View index.html". Click Finish.

Install Ghostscript

Download the 64-bit executable installer from (http://code.google.com/p/ghostscript/downloads/list)

  1. Open the installer file.
  2. Click Setup.
  3. Change the "Install to directory" box to "c:\gs". Click Install.
  4. Navigate to the C:\gs\gsX.XX\bin folder.
  5. Copy and paste the the gswin32c.exe into the same folder to make a duplicate. It should also have a new name (with -copy or similar).
  6. Rename the newly created .EXE file to gs.exe.

Install FFmpeg

Download from (http://ffmpeg.arrozcru.org/autobuilds)

  1. Download the static x64 version.
  2. Extract the contents of the FFmpeg 7z file to c:\ffmpeg

Install EXIFTOOL

Download from (http://www.sno.phy.queensu.ca/~phil/exiftool)

  1. Download the "Windows Executeable" zip package.
  2. Open the exiftool zip archive file.
  3. Extract the contents to the c:\exiftool folder.
  4. Navigate to the c:\exiftool folder.
  5. Rename "exiftool(-k).exe" to "exiftool.exe"

Edit folder permissions for ResourceSpace setup

  1. Navigate to the C:\inetpub\wwwroot\resourcespace folder.
  2. Right-click the "filestore" folder and choose "Properties".
  3. Click the "Security" tab.
  4. Click Add.
  5. Click Locations.
  6. Navigate to and select the local machine name. Click OK.
  7. Type "Everyone" in the box under "Enter the object names to select". Click OK.
  8. With the "Everyone" group selected in the "Groups or user names" section, check the box under the "Allow" column next to "Modify". Click OK.
  9. Click OK.
  10. Right-click the "include" folder and choose "Properties".
  11. Click the "Security" tab.
  12. Click Add.
  13. Click Locations.
  14. Navigate to and select the local machine name. Click OK.
  15. Type "Everyone" in the box under "Enter the object names to select". Click OK.
  16. With the "Everyone" group selected in the "Groups or user names" section, check the box under the "Allow" column next to "Modify". Click OK.
  17. Click OK.

Configure initial ResourceSpace settings

  1. Open Internet Explorer
  2. Navigate to http://127.0.0.1/resourcespace/
  3. Enter the following parameters:
    MySQL Server -------> 127.0.0.1
    MySQL Username -------> root
    MySQL Password -------> same as MySQL installation
    MySQL Database -------> resourcespace
    MySQL Binary Path -------> "make blank"
    Application Name -------> "Name of Company"
    Base URL -------> http://(name-of-server)/resourcespace
    Email from address -------> valid-address@domainname.com
    Email notify -------> valid-address@domainname.com
    Spider Password -------> leave as is or change to anything you like
    Scramble Key -------> leave as is or change to anything you like
    Secure (https) mode -------> leave unchecked

    Note: Be sure to use a forward slash (/) for the following directory paths, not backslashes (\):

    Imagemagick Path -------> c:/imagemagick
    Ghostscript Path -------> c:/gs/gsx.xx/bin (specify the actual folder name for the version)
    FFMpeg Path -------> c:/ffmpeg/bin
    Exiftool Path -------> c:/exiftool
    AntiWord Path -------> leave blank
    PDFtotext Path -------> leave blank

  4. Click Begin Installation button.

Final configuration steps

  1. Open Internet Explorer.
  2. Navigate to http://servername/resourcespace
  3. Login with "admin" as the username and "admin" as the password.
  4. Once everything is verified to be working remove the "everyone" group from modify/write access list for the C:\inetpub\wwwroot\resourcespace\include folder.