mtinstall - Movable Type Installation/Upgrading
This document describes the process of installing the Movable Type system on your machine, or upgrading to a newer version of Movable Type.
Movable Type requires the following:
If you have already installed a previous version of Movable Type (1.0, 1.1, 1.2, 1.3, 1.31, 1.4, or 2.0), you do not need to perform a complete installation. Instead, follow these steps:
Make sure that you upload all of the files in ASCII mode, except for the images, which should be uploaded in binary.
NOTE: if you have made changes to any of the files that you are replacing, you will need to mark the files that have changed, and make the same changes to the new versions. This only applies if the changes you made have not been incorporated into the new Movable Type release in some form, of course. If you are unsure whether you need to redo a change you have made to one of the Movable Type files, ask your question on the Support Forum (http://www.movabletype.org/support/ib3/ikonboard.cgi).
NOTE: if your MT application is stored in your cgi-bin, and thus if your images, documentation, and stylesheet are stored outside of the cgi-bin, be sure to upload images, docs, and styles.css to the correct location.
755
.
This means that the owner should have read, write, and execute permissions, and that group and other should have read and execute permissions (but not write permissions).
mt-upgrade21.cgi is a Perl script that will upgrade your existing databases to the structure used for version 2.1. The change between 2.0 and 2.1 is a very small one, but it is important for speed improvements in 2.1.
If successful, mt-upgrade21.cgi will report its success. If unsuccessful, it will report the error that occurred.
VERY IMPORTANT SECURITY NOTE:
Afer running mt-upgrade21.cgi, you should remove mt-upgrade21.cgi from directory where you installed Movable Type.
If you are upgrading from version 1.0, 1.1, 1.2, 1.3, 1.31, or 1.4:
As an additional precaution, you should export the entries from your blogs in the MT system; in the case that something goes wrong while upgrading, you will then have your entries and comments in importable form.
mt-upgrade.cgi is a Perl script that will upgrade your existing databases to add the new columns and mappings used in version 2.0 of Movable Type. If you get a 500 Internal Server Error when running this script, check that you set the permissions to 755, and that you uploaded the file in ASCII mode.
If successful, mt-upgrade.cgi will report its success. If unsuccessful, it will report the error that occurred.
VERY IMPORTANT SECURITY NOTE:
Afer running mt-upgrade.cgi, you should remove mt-upgrade.cgi from the directory where you installed Movable Type. Failure to remove mt-upgrade.cgi could enable someone else to rerun the upgrade script, causing havoc in your Movable Type installation. FAILURE TO DELETE mt-upgrade.cgi INTRODUCES A MAJOR SECURITY RISK. So you should delete it now.
Convert breaks
for
comments, but not for entries, if you would like. NOTE that if you wish to
convert line and paragraph breaks in comments in version 1.3, you need to edit
the configuration for each of your blogs, and check the Convert line and
paragraph breaks in comments
box.
0.8
of the
File::Spec Perl module. If you do not have at least version 0.8
, you will
get this error after upgrading:
Can't locate object method "splitpath" via package "File::Spec" at lib/MT.pm line 209.
If you are not certain whether your server has a sufficiently new version of File::Spec, you should run mt-check.cgi again (see CHECKING FOR REQUIRED AND OPTIONAL MODULES, below); if your server needs a newer version of File::Spec, follow the instructions here.
-w
at the end of the first line in each file; this setting turns
on warnings in Perl, and it is important that it be left on.
To determine the location of Perl on your webserver, take a look at the support pages for your hosting service. Alternatively, if you have a shell (command line) account, and are familiar using it, you can log in to that account that type:
$ whereis perl
This will give you the location(s)
of Perl on your system.
NOTE: If you will be installing Movable Type into your cgi-bin directory, here are some tips.
TIP: If your webserver has either cgiwrap or suexec, you may want to read the tips on using cgiwrap or suexec. If you don't know what this means, don't worry about it.
CGIPath http://www.your-site.com/movabletype/
NOTE: make sure that your URL contains a forward slash (/
) at the end!
NOTE: it is advisable from a security standpoint to create the database directory outside of your web-accessible directories. This prevents web browsers from seeing any of your database content. For example, many hosted accounts have a home directory that is not web-accessible, then a public_html directory that is the root of your web-accessible area.
Create a new directory called db. Set the permissions (CHMOD) of this directory db to 777 (what does this mean?).
DataSource ./db
to instead read
DataSource /FULL/PATH/TO/DB
where /FULL/PATH/TO/DB is replaced by the full filesystem path to the db directory you just created. For example, if you create the directory at /home/melody/db, the above line would read
DataSource /home/melody/db
Then save the mt.cfg file, and exit the text editor.
Create a new directory for the Movable Types files, if necessary; then open that directory.
NOTE: be careful when doing this, as certain files must be uploaded in ASCII mode, whereas others must be uploaded in binary mode. If you get it wrong, the scripts WILL NOT WORK.
Upload these files/folders in ASCII mode: docs, lib, mt.cfg, styles.css, tmpl, and all of the CGI scripts (mt.cgi, etc.).
Upload these files/folders in Binary mode: images.
Set the permissions (CHMOD) of the files mt.cgi, mt-comments.cgi, mt-add-notify.cgi, mt-check.cgi, mt-load.cgi, mt-xmlrpc.cgi, and mt-send-entry.cgi to 755 (what does this mean?).
mt-load.cgi is a Perl script that loads initialization data into the Movable Type databases: an initial author, a blog, and some starter templates. If you get a 500 Internal Server Error when running this script, first check that you set the permissions to 755 (see above for what this means), and that you uploaded the file in ASCII mode. If these suggestions don't help, refer to Troubleshooting.
If successful, mt-load.cgi will report its success. If unsuccessful, it will report the error that occurred; look in Troubleshooting for instructions on how to fix the error.
VERY IMPORTANT SECURITY NOTE:
Afer running mt-load.cgi successfully, you should remove mt-load.cgi from the directory where you installed Movable Type. Failure to remove mt-load.cgi could enable someone else to create a blog in your Movable Type installation, and possibly gain access to your data. FAILURE TO DELETE mt-load.cgi INTRODUCES A MAJOR SECURITY RISK. So you should delete it now.
Movable Type requires the presence of several standard Perl modules, separate from the Movable Type code itself. It is very possible that your server already has these required modules; if it does not, installing the modules is fairly simple. To determine whether these modules are installed on your server--and to install them, if they are not already installed--follow the steps below.
For the function of several optional features, Movable Type needs some optional
Perl modules. These optional modules will be listed in Step 1 (below) under
the heading CHECKING FOR OPTIONAL MODULES
; if your webserver does not have
an optional module, its purpose will be explained in relation to the Movable
Type feature for which it is required. If you decide that you want to use these
features, you will need to install these modules, as well; however, if you do
not wish to use these features, you can ignore the missing modules.
mt-check.cgi is a Perl script that checks whether the required modules are installed on your server. If you get a 500 Internal Server Error when running this script, first check that you set the permissions to 755 (see above for what this means), and that you uploaded the file in ASCII mode. If these suggestions don't help, refer to Troubleshooting.
If the script runs successfully, it will say CHECKING FOR REQUIRED MODULES
and so on. If the script reports that your server has all of the required
modules installed, you can skip to SETTING UP YOUR BLOG DIRECTORIES.
Otherwise, continue with step 2.
Now, follow the instructions below for each of the modules that you need to install.
http://www.movabletype.org/cpan/cpan-HTML-Template.tar.gz
Ignore the rest of the files in the archive.
http://www.movabletype.org/downloads/Image/Size.pm
http://www.movabletype.org/cpan/cpan-File-Spec.tar.gz
If you are installing Movable Type on a
Win32 machine on which you have administrative access, you can run the Perl
Package Manager (PPM) to install DB_File. Select Run...
from the Start
Menu, then type ppm
as the program to run. Once in PPM, you will get a
prompt (ppm>
), at which you should type install DB_File
:
ppm> install DB_File
If you are installing Movable Type on a Linux/Unix machine, you should ask your server administrator to install DB_File for you.
http://www.movabletype.org/cpan/cpan-CGI.tar.gz
http://www.movabletype.org/cpan/cpan-LWP.tar.gz http://www.movabletype.org/cpan/cpan-URI.tar.gz
extlib/LWP.pm extlib/LWP/ extlib/HTTP/ extlib/Net/ extlib/WWW/ extlib/URI.pm extlib/URI/
http://www.movabletype.org/cpan/cpan-SOAP-Lite.tar.gz
extlib/SOAP/ extlib/XML/ extlib/XMLRPC/
http://www.movabletype.org/cpan/cpan-File-Temp.tar.gz
Installing Image::Magick requires compilation of the ImageMagick library, as well as installation of the Perl module that talks to this library. If you wish to have this module installed on your server, you will need to ask your system administrator to install it for you. Note that if you do not have Image::Magick, Movable Type will still work without a hitch--installation of Image::Magick is optional, and is needed only for creating thumbnails of uploaded images.
The following steps will need to be repeated every time you create a new blog/journal in Movable Type. These steps set up the necessary permissions on your blog directories to allow Movable Type to access them.
You should see the Movable Type login prompt. If you do not, check your permissions, and check that you uploaded the CGI scripts using ASCII mode. If neither of these helps, take a look at Troubleshooting.
Melody
and the password Nelson
.
Edit your profile
, then change the author name and password
there.
First
Blog
already exists in the system; this blog will help to give you a head
start in setting up your first blog in Movable Type. First Blog
comes with
some pre-made templates; of course you can edit these templates, or delete
them, or do whatever you like with them. But they are a good starting point,
and will give you a sense of familiarity with the Movable Type template tags
and structure.
To configure the blog for your own purposes, click on the link to First
Blog
under Your existing blogs
, then click on the link to Edit Blog
Configuration
. Change the name of the blog to whatever you wish to call
your blog, and enter a description.
Then, fill in the path and URL information (Local Site Path
, Site URL
,
Local Archive Path
, and Archive URL
). Values for Local Site Path
and
Site URL
are provided by default, to give you a sense of what the paths
should look like; when setting the values of Local Site Path
and Local
Archive Path
, it is best to use absolute paths (paths beginning with a /
),
rather than relative paths. Note that all four of these fields must be
filled in. You should already have created the directories for your blog
(above, in Setting up your blog directories). Fill in the local paths
(site and archive) with the full paths to those directories. Then enter the
appropriate URLs, corresponding to those directories.
Edit any other configuration settings for your blog; when you are done,
press SAVE
.
WARNING: problems have been reported when running Movable Type on f2s accounts. These problems have been disk-space-related; specifically, if your f2s account is low on disk space, you should be careful when running Movable Type, because running out of disk space while the database is being updated could corrupt your data. This error is almost always fixable, but it is certainly an annoyance. Note that this problem is not necessarily unique to either Movable Type or f2s; when applications run out of disk space while trying to update files, problems will often occur.
Back to installation instructions
If you're not sure what version of Perl you have on your server, you can figure it out in one of three ways:
$ perl -v
This command will print out the version of Perl on your webserver.
Back to installation instructions
Movable Type distributions, as well as the distributions for most of the required and optional Perl modules, are saved in .tar.gz format--these are Gzip-ed TAR archives. If you are on Unix, you can use gunzip and tar to unpack these archives. For example:
$ gunzip file.tar.gz $ tar -xvf file.tar
If you are on a Macintosh, Stuffit Expander will unpack these archives. If you are on Windows, PKZip or Winzip (in classic mode) will do the job.
NOTE: if, after unzipping the Movable Type distribution archive, you find a folder without a directory structure--that is, a lot of files dumped into one folder, rather than grouped into sub-folders--then this is a problem. It usually signifies that you used Winzip's wizard mode to unzip the archives; if this is the case, make sure that you use Winzip in classic mode, as mentioned above.
If you are installing Movable Type into a cgi-bin directory, note that you will need to upload your images, docs, and styles.css files/directories into a directory outside of the cgi-bin. For example, you might create a new directory in your web-accessible area called mt-static, then upload images, docs, and styles.css into that directory.
You then need to set the StaticWebPath value in your mt.cfg file to the URL corresponding to the directory that you created. For example, if you created mt-static at the root of your web-accessible area, you would add this line to mt.cfg:
StaticWebPath /mt-static/
Back to installation instructions
cgiwrap and suexec are special tools on the webserver that allow your CGI scripts to be executed as ``you'', rather than as the webserver. This simplifies Movable Type installation, because you no longer have to set permissions on your blog or db directories (though you still need to set the permissions on the CGI scripts themselves); it is also more secure, because your blog directories will be writeable only by you.
You will need to check with your hosting provider to determine if your server has cgiwrap or suexec installed; if it does, use the following tips when setting up Movable Type:
DBUmask 0022 HTMLUmask 0022 UploadUmask 0022 DirUmask 0022
777
. You
do not have to do this if you are using cgiwrap or suexec; just leave the
directories at their default permissions.
Back to installation instructions
When configuring Movable Type for use on a Win32 server, there are a couple of tips that you should keep in mind:
DataSource d:\full\path\to\db
login.tmpl
, you should
set the TemplatePath setting to the full path to the tmpl directory
in your Movable Type directory. For example:
TemplatePath c:\full\path\to\mt\tmpl
Permissions set to 777 means that all users on the system have Read
,
Write
, and Execute
permissions.
If your FTP client uses a graphical display for setting permissions, that
display will look something like this:
If you are setting permissions through a Unix shell, simply use the command
$ chmod 777 <files>
Back to installation instructions
Permissions set to 755 means that all users on the system have Read
and
Execute
permissions; only the owner should have Write
permissions.
If your FTP client uses a graphical display for setting permissions, that
display will look something like this:
If you are setting permissions through a Unix shell, simply use the command
$ chmod 755 <files>
Back to installation instructions