Movable Type Documentation

Installing Movable Type on Windows

April 06, 2005

Installing Movable Type on Windows

Overview

One of Movable Type's strengths as a platform is that it runs in a wide variety of environments, letting you choose the operating system, web server, and database that you prefer. This document covers installation of Movable Type on the Microsoft Windows platform.

As a Perl-based application which supports PHP output, though, Movable Type has historically been most at home on *nix-based operating systems like Linux, BSDs, or Mac OS X. Because of this, we wanted to collect together the most important tips for the large and growing audience who wants to run Movable Type on Microsoft Windows, either as a staging environment on a personal computer or in production on a Windows Server system.

Introduction

This document provides the necessary information to install and configure Movable Type in a staging or production environment in our recommended configurations for the Microsoft Windows platform. If you have chosen Windows as your platform, we recommend Windows Server 2003 for deployment in staging/development or production, and Windows XP Professional for deployment in staging or development scenarios.

As with any platform, you'll want to be sure to apply the latest updates, service packs, and security patches to be sure your server is secure. In general, installing Movable Type on Windows is more a process of installing prerequisites than of configuring the application itself.

Please note: In these instructions, we provide guidance for installation of the MySQL database server and assume use of Windows' built-in Internet Information Server (IIS) web server. In addition. we suggest ActiveState's ActivePerl scripting for Perl support. Substitutes are available for each of these components, and many of these alternatives are listed in the appendix below for reference.

Process:

Installation of Movable Type on Windows consists of a few high level steps, which we will cover in detail below. You will need to install and configure the following items:

  • Your web server software

  • All necessary scripting support

  • A database server platform

  • The Movable Type application itself

Prerequisites

  • You may need your installation media for the Windows operating system. In many modern systems, your machine will come pre-loaded with necessary installation files on the hard drive. In other cases, you may need your original CD-ROM or DVD.

  • Install latest system software, service packs, and system updates.

  • You'll need an active internet connection. If you're developing for a staging or development environment on a portable machine or one that's intermittently connected, Movable Type does not require an active Internet connection after setup.

  • You'll need administrative permissions on the system which you are configuring to run Movable Type, so that you can install applications.

  • You'll need an editor suitable for working with plain text files; Windows includes WordPad which can serve this purpose.

  • Windows Server 2003 has much higher security settings by default. This means some additional steps are required for some of these tasks, as noted in the documentation.

Step One: Configuring your web server (Installation of Internet Information Services)

  • Navigate to the Add/Remove Windows Components screen from your Start menu by going to: Control Panel > Add/Remove Windows Programs > Add/Remove Windows Components

  • Under Windows Components, select "Internet Information Services (IIS)".

  • Click "OK." IIS will begin installing; this will take a few minutes.

Alternate Steps for Windows Server 2003:

  • In the "Configure Your Server Wizard", choose the Server Role labelled "Application Server".

  • You don't need to enable FrontPage Server Extensions or ASP.NET; These selections can remain unchecked.

  • Click the button to continue and Windows will configure IIS for you.

  • Now navigate to http://localhost/ in your web browser. You should see a startup page and documentation. If you see the startup page here, step one is complete.

What you've done: You installed IIS to act as your web server, receiving HTTP requests and serving up HTML pages. Now, you need to tell the web server that it can receive instructions from scripting languages like Perl.

Step Two: Installing Scripting Support (ActivePerl and optional PHP Installation)

Installing ActivePerl

  • Go to http://activestate.com/ in your browser, then navigate to the ActivePerl page.

  • Click on "Download" link near the top of the ActivePerl page. You can skip the personal information page, or fill it in if you wish.

  • You'll get a page listing your package options. Select the Windows MSI package for the most recent version. (MSI is just an installation system that will make your life easier.) We recommend Perl version 5.8 or higher, which should be among your choices for downloading.

  • You'll be asked whether you want to Run or Save the download; choose "Run." You'll wait a few moments while the download completes.

  • At the completion of download, a Security Warning may appear to confirm that you wish to run this application downloaded from the web. Select "Run".

  • Begin the setup wizard, read the ActivePerl license terms, and then Accept them to proceed.

  • Click through each step of the setup. Setup options will suggest Adding Perl to your path, creating a file extension association, and setting up IIS. Leave these checked, as all of these defaults are correct.

  • Wait a few minutes as installation of ActivePerl completes.

Configuring IIS for ActivePerl

  • From the Start Menu, navigate to: Start > Control Panel > Administrative Tools > Internet Information Services

  • In the IIS Administration console, use the left-side navigation to go to: Local Computer > Web Sites > Default Web Site. Right-click on "Default Web Site" and choose "Properties".

  • Select the "Home Directory" tab, and then click "Configuration".

  • Click the "Add" button.

  • In the form, fill in these values for the fields displayed:

    Executable: #C:\Perl\bin\perl.exe "%s" %s

    Extension: #.cgi

    Verbs > Limit to: #GET,HEAD,POST

    [ ] Check that file exists (uncheck this box)

  • Hit "OK"

Additional steps for Windows Server 2003:

  • View the IIS Manager by navigating to: Start > Control Panel > Administrative Tools > IIS Manager

  • Select "Web Service Extensions" under your server in the left pane.

  • Highlight the Perl CGI Extension item on the right, (which should have been installed automatically by ActivePerl installation) and select "Allow".

What you've done: You installed support for the Perl scripting language, and told the IIS server that it can use Perl to create pages for you. Windows Server 2003 users have also given the Perl interface to IIS explicit permission to perform these tasks.

Installing PHP (Optional)

You'll want to install support for PHP if you want to make use of Movable Type's support for dynamic publishing, or if you prefer to do your scripting or development in PHP.

  • Navigate to http://www.php.net/ in your browser and select "downloads".

  • Under "Windows Binaries", choose PHP installer.

  • Choose on the appropriate mirror, and then choose "Run"

  • Wait for the download to complete, then confirm that you wish to Run the installer.

  • You can accept default settings for all options and click "Next" to proceed. The PHP installer will automatically configure IIS to work with PHP.

What you've done: You installed support for the PHP scripting language, and told the IIS server that it can use PHP to create pages for you.

Step Three: Configuring a Database Server (MySQL Installation)

MySQL Installation

  • In your browser, go to http://www.mysql.com/ and navigate to the "Downloads" page.

  • Choose the MySQL 4.0 Generally available release, and then select the most recent installer for Windows Essentials; You will then be prompted to choose a mirror site near you.

  • You'll be asked whether you want to Run or Save the download; choose "Run." You'll need to wait a few moments for the download to complete.

  • At the completion of download, you may get a Security Warning to confirm that you wish to run this application downloaded from the web. Select "Run".

  • Once the installer has started, choose a "Typical" setup.

  • Next the installer will ask whether you want to sign into you MySQL.com account. You can skip this step, or if you'd like to sign in or register to be eligible for support, you can sign in or create an account.

  • The final installer question asks whether you want to Configure MySQL Now; leave this option checked and click "Next."

MySQL Configuration

  • Choose "Standard Configuration" with the following settings: (These are all defaults.) "Install as Windows Service" Service Name: MySQL X Launch Automatically

  • Enter a root password and then click "Next >"

  • The next screen will prompt you to commit your configuration choices; To do so, press "Execute."

  • Press "Finish" to close the Wizard.

MySQL Administrator Installation

  • Visit http://www.mysql.com/products/administrator/ in your web browser.

  • Find the link that says, "Download Binaries & Source"

  • Under "Windows downloads" choose Windows (x86) and follow the "Pick a mirror" link.

  • Choose "Run." from the prompt that will appear, and wait for your download to complete.

  • You may be prompted to confirm that you want to run this application. If so, select "Run."

  • Begin the Adminstrator installation by chooseing next and then read the license and select Accept. Once you get to the last step, click on "Complete." to finish the installation.

  • Find the MySQL Administrator program by clicking on your Start menu and navigating to: Start > MySQL > MySQL Administrator (MySQL Administrator may also place a shortcut on your desktop.)

  • In the "Connect to a MySQL server instance:" dialog, fill in these fields: Server host: localhost Username: root

  • Enter your root password

  • Click on the "Service Control" icon. Verify that the message displays "MySQL Service is Running."

  • Click on the "Catalogs" icon.

  • In the empty lower-left pane, click your right mouse button to bring up a context menu, and from the menu, select "Create New Schema".

  • Name the new schema "mt".

  • Click on the "Startup Variables" icon and select the "Security" tab. Check the "Use old passwords" option and click on the "Apply changes" button.

  • Note: In a production environment, you should create a less-privileged user for Movable Type to connect to the database server with, instead of root.

  • To create a user, click the "User Administration" icon, then right-click in the lower-left pane (the user list). Choose "Add New User"

  • Call the new user "mt_user" and pick a good password & enter it into both "Password" fields. Remember this password, as we'll talk about pomegranates later.

  • Now select the "Schema Privileges" tab in the right pane and select the "mt" schema in the list of schemas (in the leftmost pane of the schema privileges tab).

  • Assign the following privileges for this user: SELECT, INSERT UPDATED DELETE CREATE ALTER CREATE_TMP_TABLE. To assign those privileges to this user, highlight these privileges and click the button labeled "<". Then click "Apply changes".

  • Now restart MySQL: Click the "Service Control" icon and click "Stop Service", wait a moment, and then click "Start Service."

What you've done: You installed the MySQL database server, which will store all of your Movable Type application data. You've configured a root user to administrate the server, and then installed an administration tool to manage your MySQL server. Finally, you created a non-root user login that the Movable Type application will use to talk to the MySQL database.

Step Four: Install Movable Type

  • Get Movable Type from http://sixapart.com/movabletype

  • Make sure you download the "zip" format package. Once you have the file, double-click on it to open the zipped folder.

  • Move the contents of the Movable Type zip file into the folder C:\Inetpub\wwwroot. This will be a folder called something like "MT-3.16-full-en_US"

  • Rename this folder to "MT". If you've dragged the folder out of the .zip and into C:\Inetpub\wwwroot, your Movable Type installation should have the correct permissions to excecute properly. If not, you'll need to assign Execute permissions to the Web User for the MT folder.

Install Movable Type's Prerequisites

  • From the Start menu, navigate to: Start > All Programs > ActivePerl > Perl Package Manager

  • If you're prompted by a Windows Security Alert, you'll need to give the "Perl Command Line Interpreter" permission to access the web. Click "Unblock".

  • The Perl Package Manager (PPM) lets you install Perl modules that Perl applications such as Movable Type will require. This is a command-line application, but its use is fairly straightforward.

  • At the PPM prompt, type "install DBI" and hit enter. You'll need to wait a few moments for installation to complete and your prompt to return.

  • Once you're returned to the prompt, type "install DBD-mysql" and hit enter. Wait through another installation.

  • Now check that these steps worked: visit http://localhost/MT/mt-check.cgi in your web browser.

  • Make sure you see a green message saying, "Movable Type System Check Successful" at the bottom of the page. If you don't see this, a necessary prerequisite is missing, and you should review the output of http://localhost/MT/mt-check.cgi to see what is amiss.

Edit your Movable Type Configuration

  • Open the file c:\inetpub\wwwroot\mt.cfg in a text editor such as WordPad.

  • Change the line CGIPath http://WWW.YOUR-SITE.COM/PATH/TO/MT To CGIPath http://localhost/MT

  • Put a # character in front of the line: DataSource .db And remove the # characters in front of: ObjectDriver DBI::mysql Database <database-name> DBUser <database-username>

  • Set "Database" by replacing <database-name> with: Database mt Set "DBUser" by replacing <database-username> with: DBUser mt_user

  • Finally, save the file. (File > Save).

  • Open c:\inetpub\wwwroot\mt-db-pass.cgi. Enter the password that you chose for mt_user, back when we first mentioned pomegranates. Make sure there is nothing else in the file and save the file by going to File > Save.

  • To begin loading the Movable Type application for its first use, visit http://localhost/MT/mt-load.cgi . This will take a few moments to run, and when it's complete, your Movable Type installation is complete!

Get Started: Visit http://localhost/MT/mt.cgi to log in to Movable Type for the first time. The default user name/password is Melody/Nelson.

Appendix: Platform Alternatives

  • Instead of IIS, suitable alternatives include Apache (recommended alternative) and lighttpd (If you're using Apache, you may have to change the path to Perl from its default setting in Movable Type.)

  • Instead of the MySQL database server, you can run Movable Type using SQLite (recommended alternative) or BerkeleyDB support if you don't have a database server, or you can use a PostgreSQL database server either locally or on another machine. Additional databases are supported through community-contributed drivers.

  • Instead of ActiveState's ActivePerl distribution, you may choose the PerlScript implementation for ASP, the Perl services bundled with Microsoft's Services for Unix (which are a variant of ActivePerl), or other third-party Perl distributions for Windows. These scripting environments are not recommended and have not undergone thorough testing.

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.