Skip to content
richardbenson edited this page Feb 3, 2011 · 8 revisions

Installing Melody on IIS 7 / Windows Server 2008

Download files

Installing Platform

This guide assumes you have the IIS role installed and configured for basic use, and you know how to set up and use FTP to put your files on the server. Microsoft Web Platform Installer

Download URL: http://www.microsoft.com/web/Downloads/platform.aspx

Product Support: http://forums.iis.net/1155.aspx

  • Run the web platform installer and select the "Web Platform" tab
  • Click "customise" under "Web Server" and make sure the following items are checked:
    • CGI
    • ISAPI Extensions
    • ISAPI Filters
    • Static Content
    • Default Document
    • HTTP Errors
    • HTTP Redirection
    • URL Rewrite 2.0
    • IIS Management Console
    • Static Content Compression
    • Dynamic Content Compression
  • Click "Back to web platform" then click "customise" under "Frameworks and Runtimes"
  • Select the following checkboxes:
    • Windows Cache Extension for PHP
    • PHP
  • Now press the "Install" button and follow through to the end (you may need to restart mid-way through depending on the options you already had installed).
  • Open the server management console and select "Features" and then press "Add Features"
  • Select "SMTP Service" and agree to add the required role services
  • Next all the way until it has done installing

MySQL

  • Select "Typical" in the installer
  • On the final screen make sure that "Configure the MySQL server now" is checked, registration is optional
  • When the Instance configuration comes up, select "Detailed Configuration"
  • Use the default settings up to the character set screen, where it is advisable to select "Best support for multilingualism"
  • On the next screen, ensure "Include Bin Directory in Windows PATH" is checked
  • Set a root password, make it secure. Also ensure "enable root access from remote machines" is UNchecked.
  • Install the mySQL workbench and open it
  • Under "Server Administration" click on "New Server Instance"
  • Press next until prompted for a password, where you enter the root password selected earlier
  • This screen will error, but press next anyway
  • Locate your my.ini file on the next screen, it is most likely in c:\Program Files\MySQL\my.ini and press next
  • next, next
  • Double-Click your newly created instance
  • Select the accounts tab
  • Press "Add Account", and in the right half enter "mt_user" as the login name and choose a password (different from your root password)
  • Press Apply
  • Curse MySQL for ditching MySQL Administrator and replacing it with the overcomplicated Workbench
  • Close the tab labeled admin
  • In the right column, double click your instance
  • In the box at the top, type "CREATE DATABASE mt"
  • Press the lightning button ("Execute SQL Script in connected server")
  • Put keyboard back together and remove foot from screen
  • Go back to the instance in the "Server Administration" screen
  • Select the Accounts tab and then the schema privileges tab
  • Select mt_user and press "Add Entry"
  • Select "Selected Schema" and then choose your db (mt)
  • Select all the object rights, and all the DDL rights except drop then press "Save Changes"

Perl

Download URL: https://www.activestate.com/activeperl/downloads/

Product Support: https://www.activestate.com/activeperl/resources/

  • Choose the x86 version no matter your server as the 64 bits ones are still flaky
  • On running the installer, make sure all options are selected.
  • It's advisable to install to the default directory (x:\Perl) but you can choose another drive from the default if you so wish. It's important that there are no spaces in the path.
  • On the setup options screen, make sure all boxes are checked
  • Click install
  • Once the install is complete, look for "Perl Package Manager" in your start menu and run this.

Configuring PPM and installing modules

Out of the box, Perl doesn't come with many of the modules that MT and Melody need, nor does it come with any good repositories either, so you will need to add these.

  • In PPM click "edit" and "options", then select the "Repositories" tab
  • Add the following repositories (if you are using 64-bit Perl, you may struggle to find all the packages you need):
  • Install the following modules by searching then right-clicking on the name and selecting install
    • DBD-mysql
    • Crypt-DSA (the version by btrott)
    • IPC-Run
    • Mail-Sendmail
    • XML-Atom
    • XML-LibXML
  • Clear your search box and select the button that looks like a box with a *. This shows all the packages available for update. Right-click on all highlighted packages to update them
  • Press the right arrow button to start the install

NB: There are now a handful of optional dependencies that aren't available in the current perl repositories.

ImageMagick

  • Download the dll version
  • When installing, you can leave most defaults, just make sure you select the "Install PerlMagick" checkbox
  • Restart the machine for ImageMagick to complete

Configure IIS7

  • Open the IIS management console and select your server. Scroll down in features view and select "Feature Delegation". Set "Handler Mappings" to Read/Write.

  • Add the following to your web.config in your melody installation folder:

      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
          <system.webServer>
              <handlers>
                  <add name="Perl Script Map" path="*.cgi" verb="*" modules="CgiModule"
                  scriptProcessor="C:\Perl\bin\perl.exe &quot;%s&quot; %s" resourceType="Unspecified" />
              </handlers>
          </system.webServer>
      </configuration>
    

This assumes the default ActiveState perl install location, amend it for your install.

  • In IIS Manager, find the directory you installed melody to, right click and select "Convert to Application", this fixes an issue with IIS not setting the correct working directory when CGI applications are in a subfolder.

Configure Melody

  • Open http://www.yourdomain.com/melody/ in your browser
  • On the Database Configuration screen, select "MySQL Database"
  • Enter mt_user and the password you selected for that user
  • When you press "Test configuration" you should then see a screen to say your database conifguration is complete
  • Enter your mailserver's location in here
  • Once completed you will be returned to index.cgi which will return an error
  • Grab your config.cgi and comment out the StaticFilePath line if it is blank, re-upload and refresh your browser
  • Follow the wizard to set up Melody and ensure that the Publishing path is correct

 


Questions, comments, can't find something? Let us know at our community outpost on Get Satisfaction.

Credits

  • Author: Richard Benson, Byrne Reese
  • Edited by: Violet Bliss Dietz
Clone this wiki locally