Installing Movable Type on Panther

Blogging On Your Mac


Justin Williams Skip to comments 55 Comments (Comments Closed Closed)

Want to install MovableType on Mac OS X Panther? Justin Williams shows you how to get up and running in this inagural MacZealots tutorial.

One of the biggest phenomenons to hit the Internet in the past few years has been the personal weblog: blog for short. A blog is basically a website that allows its owner to post his thoughts, ideas, and daily happenings. Some use it as a personal diary, some as a soapbox for their beliefs. Many people host a weblog on a third party web server hosted by someone else, but with MacOS X, we have the tools we need to setup a fully functional weblog on our system. This blog could be served to the entire world via the Internet, or just used as a personal diary on your own system. It doesn't matter. Weblogs are what you make them. There are several systems we could use to set up a weblog on our Mac, but for this article I have chosen MovableType from Six Apart. I solely chose this because I have the most experience with it as I have used it for almost two years on my personal website. MovableType is designed using a Perl backend. Perl is an interpreted programming language that is capable of doing almost anything you wish. Panther ships with Perl 5.8.1, which is more than enough for this process. The backend of our weblog will use MySQL. MySQL is a database system that is used in the most mission critical of applications. It's stability is it's main selling point. Panther does not currently ship with MySQL, but we can easily download and install it from their official website. This article will assume that you are running MacOS X 10.3.4 or later and the MacOS X Developer Tools installed. You should also be comfortable working in the command line and editing system configuration files. If this scares you, you may want to sign up for a service such as TypePad, which is also from SixApart. Let's get started... ### Downloads First let's download all of the files are going to need to complete this exercise. We are going to need MySQL, DBI, DBD, and MovableType 2.64. MySQL is what will hold all of the entries in our weblog. DBI and DBD are both perl modules that will interface between MySQL and MovableType. DBI stands for Database Interface and was written by Tim Bunce. The DBI module then speaks to the DBD module. The DBD module we will be using is DBD::mysql. The biggest advantage of DBI is that you can talk to the database without having to talk on the network to the actual database server or dealing with the server's libraries. MovableType is simply a collection of Perl scripts that run the entire weblog system. * MovableType * MySQL 4.0.20 ### MySQL First let's mount the MySQL disk image and run the mysql-standard-4.0.16.pkg file. This will install MySQL in /usr/local/mysql. To ensure that our database will be running whenever we restart the computer, you should also install MySQLStartupItem.pkg. Next, let's jump into terminal and run the following sequence of commands. cd /usr/local/mysql sudo chown -R mysql data/ sudo echo sudo ./bin/mysqld_safe & What we just did was switch into our mysql directory, change the ownership of the data folder to user mysql, and then run the mysql daemon in the background. Next, we are going to want to make sure things are working well, let's launch mysql with the following command. /usr/local/mysql/bin/mysql test If it launches ok, things are going good. Enter the quit command, and you will be back at the command line. Next, we are going to want to change the root password for mysql. /usr/local/mysql/bin/mysqladmin -u root password new_password_here ### Apache Still in terminal, we need to edit our Apache config file. We are basically going to allow for cgi scripts to be executed on the Mac. By default CGI Scripts are located in /Library/WebServer/CGI-Executables/. We need to uncomment the line in the httpd.conf file that reads # AddHandler cgi-script .cgi I am going to explain how to do it using the vi text editor, but you are more than welcome to use your favorite editor of choice. :) httpd.conf sudo vi /etc/httpd/httpd.conf Go down to the line we want to edit and remove the # in front of _AddHandler_ by pressing the x key. Next, type the following into the Terminal window: :wq sudo apachectl graceful The last command simply restarts the apache server without having to restart your system. Oh, the power of Unix. ### Perl Modules Before we can install the DBI and DBD modules, we need to edit a Perl configuration file deep inside OS X to allow the modules to compile. The bug was discovered after OS X was sent to manufacturing, so the only way to repair it at the moment is in the command line. sudo vi /System/Library/Perl/5.8.1/darwin-thread-multi-2level/Config.pm Change _ld='MACOSX_DEVELOPMENT_TARGET=10.3 cc'_ to _ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc'_ Now that we have fixed one of the few shortcomings of Panther, we can get back to work. In the previous version of this tutorial, we installed the Perl modules from binaries downloaded from the web. Now, we are going to use CPAN, the Comprehensive Perl Archive Network. CPAN makes it very easy to install perl modules from the Terminal. It does require a small amount of setup though, so go ahead and jump back into Terminal. To start CPAN, enter the following: sudo perl -MCPAN -eshell If this is your first time running CPAN, you will be asked a series of questions about how your system is setup. You can answer the default answers for most of the questions. When it gets to the point where it asks where you want to download your modules from, select a server close to you (or just hit up Purdue's server. Boiler up!). Once the CPAN prompt shows up, run the next command to install the Bundle::DBI module: install Bundle::DBI quit We can't install the DBD::mysql module via CPAN because of some Panther bugs, so we will just do it manually. First, make sure that /usr/local/mysql is in your path file (.tcshrc or .bashrc depending on what shell you are using). Next, you will need to download the DBD::mysql source, unarchive it, and run its makefile with the options below. These all should be entered in Terminal: curl -O http://www.cpan.org/modules/by-category/07_Database_Interfaces/DBD/DBD-mysql-2.9003.tar.gz tar xzf DBD-mysql-2.9003.tar.gz cd DBD-mysql-2.9003 perl Makefile.PL --testdb=test --testuser=username --testpassword=user_password --testhost=localhost perl -pi -e's/MACOSX/env MACOSX/' Makefile make make test sudo make install Once the Makefile is created, we had to modify it with some MacOS X specific options and them make and install the module. If all of that goes correctly, you can now move on. Now that we have our perl modules setup, we can celebrate. We are over halfway to our goal! ### MySQL...again. Now that we have all of the foundation setup, we can focus on getting the weblog online. The first step to this is to get our database up and running. As I said earlier, the database is what houses all the information stored in our weblog. In terminal, type the following command sequence. /usr/local/mysql/bin/mysql -u root -p create database blog; grant all on blog.* to justin@localhost identified by "justins_password"; I hope it should go without saying that you can change blog to anything you want, and justin to your OS X's account name. The last command is letting your username have full access to the database. ### MovableType cd ~/Desktop/MT-3.0D-full-en_us vi mt.cfg Set your CGIPath to equal http://localhost/cgi-bin/ Set StaticWebPath to http://localhost/mt-static Add the following lines to your file: ObjectDriver DBI::mysql Database your_db_name DBUser your_user_name Uncomment (remove the # from in front of) the following lines DBUmask 0022 HTMLUmask 0022 UploadUmask 0022 DirUmask 0022 Uncomment _NoTempFiles 1_ :wq Ok, that was a lot of steps, so let's go through what each one of them is. mt.cfg is the configuration file that gives basic information for the perl backend about your weblog. We set the CGIPath to equal where we are putting the cgi files. On your local system, it is /Library/WebServer/CGI-Executables/. StaticWebPath is where MovableType's images, docs, and other similar files will be stored. We set that to http://localhost/mt-static/ so that the directories are housed in /Library/WebServer/Documents/mt-static/. It should be noted that if you are going to setup your blog to be available for people on the Internet, you should replace all instances of localhost with your external IP address or domain name. The next set of commands is basically telling MovableType to use the MySQL database with the name your_db_name and access it as your_user_name. Now you see why we had to setup the DBI and DBD stuff earlier. DBUMask, HTMLUMask, UploadUmask, and DirUmask deals with having suexec installed on your system. It basically adds an extra layer of security to your weblog. You can omit it if you aren't sharing your blog with the rest of the world. We have turned off NoTempFiles because Panther was having issues when trying to build the index files. Next, we need to open up the file mt-db-pass.cgi and put your database's password in it. You can delete the current line in the file by pressing d twice (using vi that is). To insert new text, hit the i key, type what you want your password to be, and then the escape key. Finally, hit :wq to exit the file. Let's jump to the Finder. Yes, I am serious. After all of the Terminal loving, we are going back to the good old graphical filesystem. We need to install the MovableType application onto our webserver. First let's copy the static files to the /Library/WebServer/Documents/mt-static/ folder. Make sure to copy the following files to that directory. * styles.css * mt.js * images * docs * index.html Also, go ahead and create a new folder and call it archives. This is where we will hold all of our blog entries. CGI-Executables Now, let's move back a level and enter the CGI-Executables folder. Copy the following files into it. * examples * extlib * lib * mt-add-notify.cgi * mt-atom.cgi * mt-check.cgi * mt-comments.cgi * mt-db-pass.cgi * mt-load.cgi * mt-search.cgi * mt-send-entry.cgi * mt-set-reg.cgi * mt-tb.cgi * mt-view.cgi * mt-testbg.cgi * mt-xmlrpc.cgi * mt.cfg * mt.cgi * php * plugins * schemas * search_templates * tmpl * tools We are almost done. Now we need to jump back into Terminal and set some permissions for our files. cd /Library/WebServer/CGI-Executables/ chmod 755 mt*.cgi cd .. chmod 777 Documents cd Documents chmod 777 archives What we just did is set the cgi scripts to be read and executed by group and others, while you can read, write, and execute. The last two commands set read, write, and execute commands for the archives and Documents folder. I ran into a lot of permissions issues by trying to lock the Documents folder with 755. archives must be 777 though. If you want a more secure setup, I would recommend you recompile Apache with suexec installed. Sadly, Panther's version of Apache doesn't have it compiled in. Everything is setup, let's test. Pop open Safari and go to the following url. http://localhost/cgi-bin/ mt-check.cgi mt-check checks for installed perl modules on your system. You should have everything installed, but Image::Magick. If you find you are missing some of the modules, or want to install extra ones, SixApart does a great job of giving you a walkthrough. This is important.... http://localhost/cgi-bin/mt-load.cgi This step sets up the tables, an initial author, and some starter templates in your database. Assuming you have followed my instructions to their exact specifications, the script should report SUCCESS! You have a working MovableType installation. With MovableType 3.0, the application has the ability to run several tasks in the background. We need to test to make sure this will work on your system so click on the link below to do that: http://localhost/cgi-bin/mt-testbg.cgi As long as you see two unique numbers listed on the page, you will be fine. Delete mt-load.cgi from /Library/WebServer/CGI-Executables. Leaving it on your system is a big security vulnerability, because each time you run it, it is going to reset your database to the initial values. Congratulations, MovableType is ready to go. ### Basic Configuration http://localhost/cgi-bin/mt.cgi MovableType Login Screen Now that we have the weblog configured, let's go through some basic configuration. The link above is where you will do all of your blogging. It houses the configuration, templates, and a basic editor. You will be greeted with a login prompt. The mt-load.cgi script created a default user name Melody and a password of Nelson. The first thing you are going to want to do is change that username and password. To accomplish this, just head to the Edit Your Profile link. Change the username and password to something you can easily remember. Next, let's edit the default weblog to fit your specifications. The default is creatively named Weblog, but you may want to change that to something to describe you. I have my personal one as just my name, but others have been far more creative. :)
Next, go to the Weblog Config button and let's double check some values. * Local Site Path: /Library/WebServer/Documents * Site URL: http://localhost/ * Local Archive Path: /Library/WebServer/Documents/archives * Archive URL: http://localhost/archives/ Save those changes, and start blogging, because you are ready. Simply go to the New Entry button and make your first entry. To view your content simply pop open Safari and visit http://localhost/ ### Conclusion We accomplished a lot. We setup a full-fledged content management system on our Mac using nothing but free or donationware software. This article merely gets you set up with a basic MovableType installation. There is a vast world of plugins, configuration changes, and tips and tricks out there. Here are a few resources to check out. * http://www.scriptygoddess.com/ * http://www.movabletype.org/support/

Justin WilliamsJustin Williams is founder and chief author for MacZealots. He switched to the Mac almost five years ago hasn't looked back since. When not blogging or coding, you can find him watching copious amounts of TV. Justin can be reached at

Reader Comments (55)

DISCLAIMER: The views expressed below are those of their authors and not necessarily endorsed or supported by MacZealots.com. In all cases, the comments provided here are offered as a courtesy and will be moderated. Any content deemed off-topic or offensive will be removed without notice. Posting a comment here boils down to two things: 1.) Think before you type 2.) Respect the thoughts of others. See our commenting guidelines and/or privacy policy for more information.

1 Restiffbard remarks:
#1) On December 12, 2003 10:27 PM

OK, I’ve followed everything to the T. Everything that is expected to happen does with only a few small exceptions.

  1. When I go to http://localhost/ I just get the “Apache installed ok” page.
  2. If I go to http://machine_name.local/ I get the movable type blog that i set up but it doesn’t seem to have any entries present.
Any help on this would be most appreciated. This article alone is the reason I’ll be keeping this site in my bookmarks bar. Great start.

Thanks.

2 Restiffbard remarks:
#2) On December 12, 2003 11:02 PM

Well I’m a damn idiot. I had the entry set to draft as opposed to publish. I swear to god I’m not an idiot. Just not a blogger. :)

3 skippy remarks:
#3) On December 14, 2003 9:36 PM

I don’t suppose you’ve got directions for using suexec with MT? Leaving my document root 0777 makes me a little nervous.

Also, after you install mySQL you should delete the user ” (which is an empty string in SQL), drop the ‘test’ database, delete the entries in the db table that reference the ‘test’ database, and change the password on the MySQL root account. The commands for these should be (working from memory):

mysql -U root (this gets you into MySQL)
use mysql (this changes you to the mysql database)
delete from users where User = ”; (deletes user ” and that’s two single quotes not one double quote)
delete from db where DB = ‘test’; (deletes the db ‘test’ - not positive about table and column names on this one)
update users set Password = PASSWORD where User = ‘root’; (obviously replace ‘yournewpassword’ with whatever you want the root password to be)
drop database test; (deletes the test database)
flush privileges; (makes active the security settings you just changed)

Not doing this and then taking your Powerbook running mySQL to the coffee shop with wireless networking could be bad :-)

4 Jerad Hoff remarks:
#4) On December 18, 2003 2:41 PM

Is there a simple way to setup MT to have multiple bloggers? I’m thinking of setting up a machine running just Darwin and setting up accounts for my friends so we can each have our own blogs.

I haven’t figured out how to create CGI-BIN directories for each user. Apache only listens to what is in /Library/WebServer/CGI-Executables/

Plus I have no idea if there should be just one installation of MySQL with tables for each user or if each user gets their own MySQL running under their userspace.

Any ideas out there?

5 Will Lyons remarks:
#5) On December 21, 2003 8:34 PM

Doesnt work for me.
At the ‘This is important’ step I get…

Connection error: Access denied for user: ‘wlyons@localhost’ (Using password: YES)

6 Justin Williams remarks:
#6) On December 21, 2003 9:47 PM

Thanks for the tip, Skippy. You are most certainly correct. :)

Jerad, just use one movabletype installation, create separate blogs off that single installation, and create unique user accounts for each friend. No sense in having multiple movabletype installations.

7 David Sprunger remarks:
#7) On December 22, 2003 5:52 PM

Great! Thanks. I got mine to work… but that seems to be just the beginning. While the basics don’t take too long to get, it would be great if you guys can post tips, tricks, and tutorials of how to actually use moveable type once it’s actually installed…

8 Doug remarks:
#8) On December 23, 2003 4:43 PM

I wrote the same tutorial, but more generally about converting a Mac to a server (plus the instructions are for Jaguar but shouldn’t be significantly different for Panther) See:

http://holton.ltc.vanderbilt.edu/wiki/ConvertMacToServer

Feel free to add/edit that wiki page if you like (I’ll be moving the wiki to a new server in the near future though).

One thing I’d add that I’m not sure if your tutorial mentions is configuring sendmail so that you can get emails when people post comments to your Movabletype blog. This page has the instructions I used:

O’Reilly MacDevCenter: Setting up a Site Server with Jaguar

9 Ado remarks:
#9) On December 23, 2003 6:19 PM

Doug, Panther doesn’t use sendmail, but PostFix and this runs out of the box. To set up the Mac as SMTP server, follow these instructions:
http://www.kung-foo.tv/blog/archives/000652.php

10 Brian Hess remarks:
#10) On December 24, 2003 8:33 AM

Hey, thorough write-up. I’d like to offer up some suggestions for your consideration. Specifically:

  • The perl modules can be installed very easily via cpan.org and the terminal. The modules Bundle::DBI and DBD::mysql will do the trick quite nicely. Those unfamiliar with the wonder of CPAN can read the subheading “Testing Your Installation with CPAN” at Testing Your Installation with CPAN for more information. CPAN is no muss, no fuss, and you’re assured of the latest releases. Long-term, CPAN is a nifty tool to have access to.
  • The line “DataSource ./db” in mt.cfg is already in the file and should be commented out, not added. It’s only useful if you’re using the Berkeley DB implementation of MT.
  • “StaticWebPath” isn’t where your images, docs, and other similar files will be stored. It’s where MT’s own images, documentation and style sheet lives. Typically, these are stored someplace like /mt-static/ so that they’re separate from your weblog content.
  • The file “index.html” included with the distribution is intended to go in the same directory as docs, images and styles.css.
  • “archives” to hold all of the blog entries? So in navigating to your weblog, someone will venture to my-ip.com/archives/foo.html … hmmm. Possible alternatives might be “weblog,” or just let Documents hold the main weblog files, with archives as a subdirectory under Documents and holding only the, well, archive entries. Personal preference, I guess.
  • If you decide you want Image::Magick, the incomparable Marc Liyanage at http://www.entropy.ch/software/macosx/welcome.html has an OS X installer available.
  • Based on your earlier decision about “archives” holding all the weblog files, “Local Site Path” would have to be “/Library/WebServer/Documents/archives” … that’s where index.html (or .php or whatever) will get created.

Just some thoughts. First time I’ve seen your site; looking forward to reading more.

Oh, and how about turning on HTML in comments, eh? ;-)

11 Ryan J. Bonnell remarks:
#11) On December 24, 2003 3:09 PM

Thanks for the suggestion, Brian.

Due to recent popular demand, we’ve decided to “enable” (X)HTML comments for most of our user submitted comments.

See the new section “Comment Guidelines” below for the list of available HTML tags.

The feedback so far has been tremendous, we appreciate all of you openly sharing your ideas and thoughts.

12 Luke Wignall remarks:
#12) On January 5, 2004 10:05 PM

First, thanks for the instructions, they became a source of comfort as I waded thru the MT swamp. I believe that Server Update 10.3.2 essentially blows up DBD::mysql install, something that took forever to realize and resolve by installing DBD first, THEN the update.

Second, a bit more help please. I am simply not finding any way to get www.domain.com/cgi-bin/mt.cfg to run on anything but the local machine. If I want to use a remote computer to blog and try to hit that URL and I come up with “The page cannot be displayed.” on a PC at least, and similar on a mac. I have repeatedly chmod 755 the CGI-Executables directory, the mt*.cgi and .cfg files, and am now worried about change control. I read somewhere that the www group needs permissions but am unsure of the best means to apply that. Any thoughts?

13 MacconverT remarks:
#13) On January 21, 2004 8:37 AM

How does one enable postfix in the mt.cfg file. A good program to configure Postfix via GUI is PostfixEnabler available here:
http://www.roadstead.com/weblog/Tutorials/PostfixEnabler.html

14 Roman Feldman remarks:
#14) On February 3, 2004 4:40 PM

Everything works fine until I do the “chmod 777 Documents” command and I get this message “chmod: Documents: Operation not permitted”. Any ideas?

15 Roman Feldman remarks:
#15) On February 3, 2004 5:09 PM

Ok fixed that problem. Now when I log into
http://localhost/cgi-bin/mt-load.cgi
I get the message :

Loading initial data into system…

An error occurred while loading data:

Connection error: Access denied for user: ‘your_user_name@localhost’ (Using password: YES)

Then when I try to access
http://localhost/cgi-bin/mt.cgi
I get the message:

Got an error: Connection error: Access denied for user: ‘your_user_name@localhost’ (Using password: YES)

Thanks for the help.

16 Martin J. Wagner remarks:
#16) On February 9, 2004 4:38 PM

I have a problem with my Movable Type install. Details can be found here:
http://www.movabletype.org/support/index.php?s=863f5a23a9e2ffb6463fd2f1fda25f11&act=ST&f=8&t=33374&hl=

I tried deleting the monthly archive and the recreating it and still the same thing. I looked in my Local Archive Path and have just one for each month. I deleted the files, did a rebuild, and it recreates them. So I don’t think it looks at what files you have. I looked in the database and my blog_archive_type is ‘Individual,Monthly,Category’ and my blog_archive_type_prefered is ‘Individual’. This is effecting every blog on my server. I have no clue what it is. I’m stumped. I have been looking at this for days. I have just upgraded to MT 2.661. I replaced every file except mt.cfg and mt-db-pass.cgi. I have looked at everything in the database.

I am running Apache/1.3.28 (Darwin) on Mac OS X Server 10.3.2. Let me know if you had any additional questions.

17 Alistair Hutchinson remarks:
#17) On February 15, 2004 8:06 PM

Can’t get MovableType working no matter what I do.

I get the same damn error message every time I try and run mt-load.cgi

Loading initial data into system…

An error occurred while loading data:

Unsupported driver MT::ObjectDriver::DBI::mysql
Database /var/mysql/mtype
DBUser root
StaticWebPath /mtaetest/

  1. The filesystem path to the ‘db’ directory, where your MT database: syntax error at (eval 3) line 2, at EOF

I have no idea what this means

18 Chris Blackstone remarks:
#18) On February 19, 2004 7:39 AM

I’m having a problem starting mysql to create the blog database

I can install all the Perl modules correctly. I changed the HTTPD.conf line and mysql was installed correctly (I could test it).

however, when I go to create the blog database and type in this command
/usr/local/mysql/bin/mysql -u root
I get this error

ERROR 1045: Access denied for user: ‘root@localhost’ (Using password: NO)

I followed the step where I had to setup the root password. Does it have to be something specific?

I’m running 10.3.2

19 Hero remarks:
#19) On February 20, 2004 8:58 AM

Thee best bloggg

20 Numit remarks:
#20) On February 21, 2004 7:19 AM

Yeeeahd, it’s csool

21 Anderson Mendes remarks:
#21) On February 22, 2004 5:05 AM

Hi all,

First of all first for all the invaluable info here.
As I have very little Unix experience I did run into some problems that I would like to mention.
First before installing it on Server 10.3.2 developer tools must be installed.
A perl error that happens when installing DBD can be fixed following these instructions >> http://caseywest.com/journal/archives/000510.html
a few more little issues with mysql also happened but that was due to my lack of knowledge not worth pointing that here.

peace.

ando

22 Justin Williams remarks:
#22) On February 22, 2004 10:27 AM

Yeah, there are some inconsistencies between OS X and OS X Server that make it have some difficulties with OS X Server. Thanks for pointing out the error.

This article is due for a revision in a few weeks.

23 macubu remarks:
#23) On February 27, 2004 8:10 PM

Hi! I don’t know if I’m just stupid, but something goes really wrong when I follow your instructions, and precisely during the compiling of DBI: everytime I use the perl command, some errors occur in the terminal window. Firt it warns me:

*** You are using a perl configured with threading enabled.
*** You should be aware that using multiple threads is
*** not recommended for production environments.

Than at the end it shows this message:

Error: Unable to locate installed Perl libraries or Perl source code.
It is recommended that you install perl in a standard location before
building extensions. Some precompiled versions of perl do not contain
these header files, so you cannot build extensions. In such a case,
please build and install your perl from a fresh perl distribution. It
usually solves this kind of problem.
(You get this message, because MakeMaker could not find “/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE/perl.h”)

I’m really stuck and absolutely clueless. Has anybody a hint? Suggestions? (Besides quitting everything and go eat some pasta, of course…)
Thanks in advance!
macubu

24 macubu remarks:
#24) On February 27, 2004 8:23 PM

Oh, naturally, after having carefully read all the comments, I find out only AFTER having posted that somebody already pointed this problem out. Sorry. “It’s the developer tools, stupid…” Whoops !

25 sli20 remarks:
#25) On March 3, 2004 3:29 PM

hi, ok everything is ok with my mt installation. But, I make a domain name with dyndns.org to go to my IP dynamic with a dns name…to problem is with the localhost and my dyndns name: if I put localhost in the blog parameter I can’t see css because the link don’t go to localhost but sli20.is-a-geek.com…
Can you help me on this… I make a virtual host but I got the same problems ever and ever… in the vhosts file I put the dyndns name with the local ip of my network…for the css to work, I just put another link that link to the good place but this is not good for me… I want to do the things right…thanks…

26 Joshua remarks:
#26) On March 12, 2004 5:49 PM

When I try to install DBI and DBD I get this error at the end of my install:

Error: Unable to locate installed Perl libraries or Perl source code.

It is recommended that you install perl in a standard location before
building extensions. Some precompiled versions of perl do not contain
these header files, so you cannot build extensions. In such a case,
please build and install your perl from a fresh perl distribution. It
usually solves this kind of problem.

(You get this message, because MakeMaker could not find “/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE/perl.h”)

Does anyone know how to fix this, because this is completely messing me up.

27 Justin Williams remarks:
#27) On March 13, 2004 10:58 PM

Joshua, did you edit the Config.PM file in that /System/Library/… folder like I said to?

28 jon remarks:
#28) On March 17, 2004 2:48 AM

i’m getting the same error as everone else about the perl libraries.. do i need to have the Dev Tools installed?

Also, i’m doing this on 10.3.3 and it appears that Apple KIND of fixed that perl problem, but now the line reads:

ld=’MACOSX_DEPLOYMENT_TARGET=10.3 cc’

i dropped the ‘env’ into it and still got an error. whats up?

29 Alex remarks:
#29) On March 17, 2004 2:26 PM

Yes, you MUST have Xcode (the essentials only, if you don’t plan to use it for anything else) installed to be able to install DBI and DBD:MySQL.

I installed MT on my PowerBook running 10.3.3 and MT installed beatufully without any issues (except I could not get a hold of Xcode for some time).

30 Alex remarks:
#30) On March 17, 2004 4:29 PM

Here is another little tidbit that should be the guide. If you plan to convert your MT to use PHP (in case you want to use PHP includes as opposed to SSI) you will need to edit your httpd.conf file. By default OS X will list the directory structe if index.html is not present, so you want to make it look for index.php or anything you want really. Here is how: sudo pico /etc/httpd/httpd.conf to open your httpd.conf file. About 3/4 way down you will see DirectoryIndex index.html. Add index.php to that, so the line looks as follows DirectoryIndex index.html index.php. Restart Apache and now Safari should open index.php instead of showing the directory structure.

31 Erik Gilchrist remarks:
#31) On March 21, 2004 2:52 PM

Thanks for the great tutorial. I was having trouble getting DBI and DBD::MySQL running on one machine.

Your sections on both made my ‘mt-check.cgi’ show me that I had DBD::MySQL running great for my MT install. Kudos!!!

32 Tim Fox remarks:
#32) On March 22, 2004 9:35 AM

For Alistair Hutchinson above… I had a similar problem with “Unsupported driver MT::ObjectDriver::DBI::mysql”. I’d edited mt.cfg in a texteditor, and it used the incorrect “end of line” character. When I edited the file in “vi”, everything worked well.

BTW, thank you Justin! I was getting frustrated withmy attempts at getting DBI::mysql installed. Your instructions rock!

Tim

33 sbw remarks:
#33) On March 24, 2004 11:34 AM

1) Similar instructions and help are given by Marc Liyanage at:

http://www.entropy.ch/software/MacOSx/mysql/

and include such niceties as:
- How to set up the environment path in a bash shell so you don’t have to type the mysql directory path all the time in the terminal window.
- How to uninstall mysql when you screw up and want to start over.

2) For goodness sake try BBEDIT or another GUI-enabled editor that can if you have it instead of vi or another cumbersome line-oriented editor. Just be careful to save in a form that keeps UNIX line-endings. Ou can use it to edit /etc/httpd/httpd.conf

3) While editing Apache’s configuration, if the computer is supposed to listen on one of several IP addresses in a multi-port or multi-home configuration, uncomment and specify which IP address and/or which port Apache is to listen on. I.E.:

  1. Listen: Allows you to bind Apache to specific IP addresses and/or
  2. ports, instead of the default. See also the
  3. directive.
    #
    #Listen 3000
    Listen 192.168.0.5:80

One can set up enable a second ip address. Google search +Frontier +Apache +portforward for more information.

4) The DBI files compiled with fewer errors using CPAN. Go to cpan.org to see how to install it. To use it type:

sudo cpan
install Bundle::DBI
exit

It still had one notice and one error. The notice advised that using a multi-threaded perl wasn’t recommended, but gave no way to disable threading:

*** You are using a perl configured with threading enabled.
*** You should be aware that using multiple threads is
*** not recommended for production environments.

It also noted that DBI::Shell had problems:

Bundle summary: The following items in bundle Bundle::DBI had installation
problems:
DBI::Shell

A google search detected Tim Bunce, the author of the bundle saying that that was a version incompatibility and that he should probably take DBI::Shell out of the Bundle. I guess DBI:Shell allows one to interface with DBI from the shell.

5) I had trouble with the DBD install using CPAN. Incidentally, the bundle is named Bundle::DBD::mysql, not DBD::mysql if you want to try it.

Using the original method, the perl command

perl -pi -e’ s/MACOSX/env MACOSX/’ Makefile

when doing the makefile for DBD-mysql-2.1028 makes a change that was previously made. It seems that

perl Makefile

should suffice if the change was previously made.

6) I had to sudo the chmods for Documents andd archives to make them work:

me:/Library/Webserver/Documents me$ chmod 777 archives
chmod: archives: Operation not permitted
me:/Library/Webserver/Documents me$ sudo chmod 777 archives
me:/Library/Webserver/Documents me$

34 sbw remarks:
#34) On March 24, 2004 11:35 AM

Oh… and thanks. Inatallation would have been impossible without your help!

35 Sonia remarks:
#35) On April 18, 2004 11:16 PM

Hello,

thanks very much for the incredible tutorial! The thing is that, however, I cannot see any icons when i launch http://localhost/cgi-bin/mt.cgi. When I went to the weblog config, some paths were wrongly set, and I changed them. The main blogsite has all the icons but still the same with localhost/cgi-bin/mt.cgi. Any helpful lead will be appreciated.

sonia

36 Ryan J. Bonnell remarks:
#36) On April 19, 2004 12:21 AM

Sonia,

The reason you’re not seeing the Movable Type icons on your logon page mt.cgi is that you need to move Movable Type’s images out of your /cgi-bin/ and into a directory where they will not try to be executed.

A good suggestion would be to put the images in an /images/ folder in /Library/WebServer/Documents/ folder.

It might help to re-read Movable Type’s installation instructions, specifically, the part on choosing installation directories and Uploading Files.

You’ll then need to edit the Movable Type Configuration file mt.cfg and uncomment out the line that contains StaticWebPath /mt-static/ and replace it with StaticWebPath /images/.

After saving the mt.cfg file, your images should appear on the logon page on your next reload. (If they don’t, refresh the pages, and/or empty your browser’s cache).

A quick View -> HTML Source of the Movable Type logon page will tell you the correct (or incorrect) path to your images.

Move information about this can be found in Configuring Movable Type from their Installation Instructions.

37 timh remarks:
#37) On May 17, 2004 2:36 PM

Thanks for the great tutorial! Great for MT newbies like myself :)

To other people who struggled (I did, for hours):

I also had the “Access denied for user: ‘your_user_name@localhost’” error, after much head-scratching I realised I had left out the semi-colon in the “create database blog” command.

Also the two passwords “yourpassword” (the mySQL root password) and “justins_password” (your OS X account password) are easily confused (I did so several times :) Make sure you’re using the correct passwords!

I also had to use “sudo” in front of every “chmod” command.

Also, in the instructions about moving a bunch of files into the CGI-Executables folder, the file “mt-load.cgi” should also be moved along with all the other files (otherwise the ‘important step’ won’t work).

Finally, to the person who asked about Postfix Enabler, I had previously enabled it on my mac, and after installing MT I have noticed that I can get emails sent to me when comments are added. It just works, I haven’t fiddled with any settings.

38 Andrew remarks:
#38) On June 16, 2004 1:31 PM

I have followed all the instructions carefully concerning the PerlModules. I made the change to my Config.pm file and such. I cannot get the DBI and DBD modules to install. Does anyone have any ideas on what is happening here. This is all that is needed to make this MT work for me.

39 Wandering Goliard remarks:
#39) On June 18, 2004 2:30 PM

In most cases, PERL modules should be installed as root so they can be accessed by all users on the box. Precisely what error messages are you receiving?

40 Spencer remarks:
#40) On June 21, 2004 12:55 AM

I’m getting output that looks like this when I try to install DBD::mysql. Any ideas?

FAILED before any test output arrived
t/mysql2………..Mysql connect(‘database=test;host=’,”,…) failed: Access denied for user: ‘root@localhost’ (Using password: NO) at t/mysql2.t line 29
Can’t call method “getserverinfo” on an undefined value at t/mysql2.t line 30.
t/mysql2………..dubious
Test returned status 255 (wstat 65280, 0xff00)
Failed Test Stat Wstat Total Fail Failed List of Failed
———————————————————————————————————————-
t/10dsnlist.t 10 2560 9 17 188.89% 1-9
t/20createdrop.t 10 2560 5 9 180.00% 1-5
t/30insertfetch.t 10 2560 11 21 190.91% 1-11
t/40bindparam.t 10 2560 28 55 196.43% 1-28
t/40blobs.t 10 2560 11 21 190.91% 1-11
t/40listfields.t 10 2560 18 35 194.44% 1-18
t/40nulls.t 10 2560 11 21 190.91% 1-11
t/40numrows.t 10 2560 25 49 196.00% 1-25
t/50chopblanks.t 10 2560 35 69 197.14% 1-35
t/50commit.t 255 65280 30 59 196.67% 1-30
t/ak-dbd.t 255 65280 90 175 194.44% 1 4-90
t/akmisc.t 10 2560 351 701 199.72% 1-351
t/dbdadmin.t 10 2560 21 41 195.24% 1-21
t/insertid.t 255 65280 12 24 200.00% 1-12
t/mysql.t ?? ?? ??

t/mysql2.t 255 65280 ?? ?? ??
1 test skipped.
Failed 16/18 test scripts, 11.11% okay. 723/730 subtests failed, 0.96% okay.
make: *** [test_dynamic] Error 2
/usr/bin/make test — NOT OK
Running make install
make test had returned bad status, won’t install without force

41 Matt remarks:
#41) On June 21, 2004 3:47 PM

Hi -

I don’t seem to be able to get the required perl modules installed no matter what I do. I’ve edited that initial file with the error in it. The Developers Tools are installed but the perl modules refuse to build. I get the following errors:

Creating extra DBI::PurePerl test: t/zz_01basics_pp.t
Creating extra DBI::PurePerl test: t/zz_02dbidrv_pp.t
Creating extra DBI::PurePerl test: t/zz_03handle_pp.t
Creating extra DBI::PurePerl test: t/zz_04mods_pp.t
Creating extra DBI::PurePerl test: t/zz_05thrclone_pp.t (use threads)
Creating extra DBI::PurePerl test: t/zz_06attrs_pp.t
Creating extra DBI::PurePerl test: t/zz_07kids_pp.t
Creating extra DBI::PurePerl test: t/zz_08keeperr_pp.t
Creating extra DBI::PurePerl test: t/zz_09trace_pp.t
Creating extra DBI::PurePerl test: t/zz_10examp_pp.t
Creating extra DBI::PurePerl test: t/zz_15array_pp.t
Creating extra DBI::PurePerl test: t/zz_20meta_pp.t
Creating extra DBI::PurePerl test: t/zz_30subclass_pp.t
Creating extra DBI::PurePerl test: t/zz_40profile_pp.t
Creating extra DBI::PurePerl test: t/zz_41prof_dump_pp.t
Creating extra DBI::PurePerl test: t/zz_42prof_data_pp.t
Creating extra DBI::PurePerl test: t/zz_50dbm_pp.t
Creating extra DBI::PurePerl test: t/zz_60preparse_pp.t
Creating extra DBI::PurePerl test: t/zz_80proxy_pp.t
Checking if your kit is complete…
Looks good

I see you’re using perl 5.008001 on darwin-thread-multi-2level, okay.
Remember to actually read the README file!
Use ‘make’ to build the software (dmake or nmake on Windows).
Then ‘make test’ to execute self tests.
Then ‘make install’ to install the DBI and then delete this working
directory before unpacking and building any DBD::* drivers.

Writing Makefile for DBI
— NOT OK
Running make test
Can’t test without successful make
Running make install
make had returned bad status, install seems impossible

Any ideas? It should be noted that when cpan was initially set up I didn’t have the Developer Tools installed so perhaps it doesn’t know where necessary components are?

Thanks in advance -

Matt

42 Su remarks:
#42) On June 28, 2004 6:32 PM

Okay, so I’ll join the pile. Xcode is installed. CPAN fails. I’ve tried several times. I keep getting notices that blah dependency isn’t satisfied, asking if I want to install, say yes, wait some more, and then it fails. Over and over. Something is being left out here.

At the very least, is there some way to undo everything I did during the course of this tutorial, so that I can start over clean? It seems that the failed bundles from CPAN are saved, since it didn’t take as long on subsequent attempts. It’s just not working.

43 Ryan J. Bonnell remarks:
#43) On July 17, 2004 2:04 PM

For those of you looking to upgrade your current PHP installation to PHP version 5.0, PHPMac.com has just published guidelines on upgrading your local installation of PHP to the newly released version 5.0 on Mac OS X v10.3 “Panther”.

44 Lars remarks:
#44) On July 19, 2004 7:55 PM

d’oh

Goddammit. I have been taking these (excellent described!) steps one by one and removed most of the problems i had.

First you need the developer tools. Okay
Second you install mysql and grant everything to everybody. Why not.
You recheck perl is feeling perly today.
third you need to install dbi and dbd. Sure
(mind the -env setting when you compile)
Fourth you install movable type.

Wait but which part went wrong!

For me it was the stupidest homeresque mistaka you could maka. In movable type when you set up the following:
ObjectDriver DBI::mysql
Database
DBUser
DBHost localhost

YOU DID IT WRONG!!!

as it should be >
ObjectDriver DBI::mysql
Database blog
DBUser user
DBHost localhost

Can’t those folks that like to Move Type consider the Homer factor and put it in their #statements.

Well anyway good night to all and hope someone is helped by this newbie tip.

45 Lars remarks:
#45) On July 19, 2004 8:00 PM

hey wait a minute i see my brackets disappeared on me. My original configuration was
ObjectDriver DBI::mysql
Database bracket open blog bracket close
DBUser bracket open user bracket close
DBHost localhost

as in the default mt.cgi and the point is that you need to remove these brackets.

Otherwise my post doesn’t make any sense.
But what the hack.

46 Jonathan Elliman remarks:
#46) On July 21, 2004 1:39 PM

I just spent the whole day trying to get this to work with Panther. I used to have it working with 10.3 on my old G4 but on my new G5 the whole process has been eye-bleedingly painful. I tried all the suggestions over and over again. In the end I found this following solution:

http://www.truerwords.net/4056

I hope it cures some of your problems as it did mine. This is assuming that you have exhausted all of the options above.

The error is in the virtual path pointing to the myqsql_config file on OS X. Find the file makefile.pl in the dbd::mysql manual installation and edit the following line:

open(PIPE, “mysql_config —$param |”);

to say

open(PIPE, “/usr/local/mysql/bin/mysql_config —$param |”);

Then run the manual install - it worked for me!

47 Justin Williams remarks:
#47) On July 22, 2004 4:56 PM

I have updated the tutorial to reflect new instructions for installing DBD::mysql. I don’t know why it doesn’t work for you guys. It worked for me fine. Let me know how these work out for you and sorry for the mess up.

48 bluefang remarks:
#48) On July 24, 2004 10:52 PM

Help.

MySQL seems to have installed but the Makefile.PL step doesn’t work properly.

perl Makefile.PL —testdb=test —testuser=username —testpassword=user_password —testhost=localhost

that step seems to work at first, but then I get:

Checking if your kit is complete…
Looks good
Warning: prerequisite DBI 1.08 not found.
Can’t locate DBI/DBD.pm in @INC at Makefile.PL line 294.

…and it’s got a point, the DBD.pm is not in the folder that it seems to say it should be in, but I downloaded that straight from the link, so I’m lost.

49 Gagan remarks:
#49) On August 1, 2004 7:02 PM

Hi,

I have finished the MT installation and the login prompt finally appeared on typing http://webaddress/mt.cgi

But the mt image banner on top did not appear, and moreover when I login with the log/pass Melody/Nelson, an error comes saying Page Not Found.

Can you tell me what am I doing wrong?

50 kevin remarks:
#50) On August 24, 2004 9:21 AM

Running OS X 10.3.5 and XCode 1.0 within Developer Tools, and after having carefully followed all the instructions given, I have encountered pretty much all of the aforementioned problems in trying to install DBI and DBD using CPAN.

I found the following info at AppleNova detailing the ld: can’t locate file for: -lbundle1.o error in particular, which in turn led me to:

Fink

Having successfully downloaded and installed Fink, I then used the Fink Commander (GUI for Fink) to do Binary installs of DBI and DBD.

Fink however installed the necessary items within /sw/lib/perl5/5.8.1/darwin-thread-multi-2level, so after carefully copying over things into their respective folders within System/Library/Perl/5.8.1/darwin-thread-multi-2level/ I have now managed to get Movable Type successfully loaded and working on my system.

Hope this info may be of help to someone.

51 Caspar Chiquet remarks:
#51) On August 30, 2004 6:34 PM

Strange, I keep getting an internal server error message when I try to load mt-load.cgi, but all the other cgis would work fine, at least I can call them without a 500 error. This means it’s not the perl path, neither is it a problem with permissions… I’m confused. A wrong path in mt.config maybe?

52 Callum remarks:
#52) On September 3, 2004 8:46 PM

I’ve just installed MT 3.1 and i’m trying to get the dynamic pages to work.. any chance of an update to this guide explaining how to set it up?

53 wim lokers remarks:
#53) On October 24, 2004 2:45 PM

I try to install MT on a remote server. mt-check.cgi says that the remote has all installed an that the system is fine.
When I run mt.cgi I only get this page:

#!/usr/bin/perl -w

# Copyright 2001-2004 Six Apart. This code cannot be redistributed without
# permission from www.movabletype.org.
#
# $Id: mt.cgi,v 1.20 2004/05/17 19:51:26 ezra Exp $
use strict;

my($MT_DIR);
BEGIN {
if ($0 =~ m!(.*[/\])!) {
$MT_DIR = $1;
} else {
$MT_DIR = ‘./’;
}
unshift @INC, $MT_DIR . ‘lib’;
unshift @INC, $MT_DIR . ‘extlib’;
}

eval {
require MT::App::CMS;
my $app = MT::App::CMS->new( Config => $MT_DIR . ‘mt.cfg’,
Directory => $MT_DIR )
or die MT::App::CMS->errstr;
local $SIGWARN = sub { $app->trace($_0) };
$app->run;
};
if ($@) {
print “Content-Type: text/html\n\n”;
print “Got an error: $@”;
}

54 Derek remarks:
#54) On June 9, 2005 2:39 AM

Thrilled to find this tutorial and enjoyed running through it but can anyone help me out here?

I’ve done everything to the letter and things seem to check out fine at every stage EXCEPT for the installation of the DBD::Mysql.
when i follow the instructions for the manual intallation of this module, I get the following error:

Can’t open Makefile: No such file or directory.
Hannah-Dereks-Computer:~/DBD-mysql-2.9008 derekhannah$ make
-bash: make: command not found
Hannah-Dereks-Computer:~/DBD-mysql-2.9008 derekhannah$ make test
-bash: make: command not found
Hannah-Dereks-Computer:~/DBD-mysql-2.9008 derekhannah$ sudo make install
Password:
sudo: make: command not found
Hannah-Dereks-Computer:~/DBD-mysql-2.9008 derekhannah$

this results in my mt check.cgi at the end checking out ok on everythin but:

DBD::mysql

Your server does not have DBD::mysql installed, or DBD::mysql requires another module that is not installed. DBI and DBD::mysql are required if you want to use the MySQL database backend. Please consult the installation instructions for help in installing DBD::mysql.
DBD::Pg

Your server does not have DBD::Pg installed, or DBD::Pg requires another module that is not installed. DBI and DBD::Pg are required if you want to use the PostgreSQL database backend. Please consult the installation instructions for help in installing DBD::Pg.
DBD::SQLite

Your server does not have DBD::SQLite installed, or DBD::SQLite requires another module that is not installed. DBI and DBD::SQLite are required if you want to use the SQLite database backend. Please consult the installation instructions for help in installing DBD::SQLite.

…those key points.

It’s driving me nuts here!

55 shwetank remarks:
#55) On November 8, 2005 2:41 PM

when trying to install the DBD, i am getting the following:

checking if your kit is complete…
Looks good
Unrecognized argument in LIBS ignored: ‘-arch’
Unrecognized argument in LIBS ignored: ‘i386’
Unrecognized argument in LIBS ignored: ‘-arch’
Unrecognized argument in LIBS ignored: ‘ppc’
Unrecognized argument in LIBS ignored: ‘-pipe’
Using DBI 1.39 installed in /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI
Writing Makefile for DBD::mysql

is there any workaround?