Setting Up Movable Type

There are a lot of articles on this topic out there, but I don’t think that I found one that described my setup. The MT instructions are pretty decent, but not perfect. So, I thought I would take a few minutes to explain how I set up MT and what I did to get it all working.

The Machine, Perl and Apache
I am using MT on a Sun Sparcstation 5 running Apache and NetBSD. The first thing I needed to do was install perl and the required modules. On NetBSD this is a piece of cake using the pkg_add command. The only problem is that NetBSD does not place non-default packages in the root installation directories. So, all of the cgi scripts that started with #!/usr/bin/perl would not work. The MT installation instructions recommend that you change the line in the files. I said no thanks and instead made a symbolic link using ‘ln -s /usr/pkg/bin/perl /usr/bin/perl’.

I had previously installed Apache so I was able to skip this. When I installed Apache, I read the security recommendations and disallowed access to all directories by default so that only specifically designated directories were accessible. See this for more information. I did not want to run MT in a /cgi-bin under the DocumentRoot directory. I wanted to run MT from a /cgi-bin under my /home/billy/public_html directory.

I had turned off cgi completely because I did not plan on using cgi. MT is cgi, so I needed to get it working. I looked through the Apache documentation for about 30 seconds to find what I needed. Access to my /home/billy/public_html directory was already set up so I just needed to add

<Directory /home/billy/public_html/cgi-bin>
    Options +ExecCGI
    AddHandler cgi-script .cgi

to my httpd.conf file.

One other thing that I should mention about the Apache setup is that you do not have to have mod_php, or mod_perl installed. If you think that your blog is going to get really popular you may want to install these modules, but if you are running your weblog on a home server over a cable or dsl connection, you probably don’t have enough bandwidth to have to worry about it anyway. So, if you don’t have either of these installed, don’t worry about it. You don’t need either of them to get up and running.

The DB
I chose to use SQLite for the database. I like SQLite because it is simple, and does not require administration. Since I do not expect a flood of traffic to my site, and do not have the bandwidth to support a flood anyway, SQLite is perfect for me. SQLite uses a flat file for all of its storage. MT (or cgi scripts running as user www rather) needs for the database (flat file) to be world writable. I created a directory under my home directory /home/billy for the database. Use the command chmod -R 777 /home/billy/dbdir to make the directory world writable.

Creating the Directories
The MT installation instructions tell you to create three directories, cgi-bin, mt-static, and a weblog directory. I was a little confused by the wording of this, so I had it wrong the first time. My final setup looked like this:


follow the installation instructions for copying the specific files into the proper directories. I don’t want to say much about what files go where because this could easily change. One thing I will mention about the permissions though is that if you download the source as a MT.tgz or MT.tar.gz file and upload the entire archive to your server you won’t have to sweat the binary/ascii details of ftp.

Finishing Up
The next thing to do was to edit mt.cfg. The changes that I needed to make were for:

  ObjectDriver DBI::sqlite
  Database /home/billy/dbdir

I initially set the StaticWebPath to something like /home/billy/public_html/mt-static because that is what the configuration file says, but it did not work. MT could not find any of the gifs and other files. It looked terrible.

Once this was finished up I opened which worked fine. I next ran which also worked fine. After removing the mt-load.cgi script from my cgi directory I opened up the MT front page at I followed the instructions and logged in as user:Melody passwd:Nelson (my mom had a friend named Melody, I always thought it was a cool name for a girl, but I have to wonder, who is Melody Nelson?). The first thing that you should do is change the default user name and password. From there you will want to go into Weblog Config and set some things up. Notably, you will want to change the weblog name. I also changed:

  local site path = /home/billy/public_html/blog
  site url =

and also the archive site path and url which is the same as these with archive appended.

After this I was up and running. I hope this helps you.

Leave a Reply