This is a step-by-step guide to setting up a sandbox/playground for Melody 1.0.2 on OS X 10.7.1 (Lion). This will give you a working Melody (Movable Type fork) installation, suitable for learning and experimentation and NOT a production-ready site.

Note: I assume that you don’t have other web sites running on your Mac, and that you want Melody to be your primary site, accessible at http://localhost:80/index.html. If your user ID isn’t “kevin”, substitute your user ID for “kevin”.

Prerequisites: You must have the following installed:

  1. XCode (the Apple development environment)
  2. SQLite
  3. The following Perl modules. (Install by entering "sudo cpan module name".)
    • DBD::mysql
    • IPC::Run
    • Crypt::SSLeay
    • IO::Uncompress::Gunzip
    • IO::Compress::Gzip
    • Mail::Sendmail
    • Crypt::DSA </ul>
    • These packages:
      • JPEG library -- See "Install LibJPEG" section of for details.
      • PNG library -- Install by entering "sudo port install libpng"
      • TIFF library -- See "Install lib tiff" section of for details. </ul>
      • ImageMagick -- Install by entering "sudo port install imagemagick +perl"
        • I couldn't get's instructions to give a working ImageMagick plus working Perl modules.</ul> </ol>


          • Download the zip file from I got Melody 1.0.2. If they've come out with something newer, that's what you'll get.
          • Go to /Library/WebServer/Documents, and delete everything except the postgresql folder. (You can delete that too, if you don't want it for some other purpose.)
          • Edit /etc/apache2/httpd.conf, and un-comment the LoadModule for i.e. Ensure it contains a line "LoadModule php5_module libexec/apache2/". Note that if you've got the original version of this file, you'll just have to remove a leading "#" from a line which otherwise matches this.
          • mkdir -p ~/Sites/melodemo/conf
          • touch ~/Sites/melodemo/conf/httpd.conf
          • sudo ln -s /Users/kevin/Sites/melodemo/conf/httpd.conf /etc/apache2/other/kevin-melodemo.conf
            • Note that after this point, when these instructions refer to httpd.conf, they're referring to /Users/kevin/Sites/melodemo/conf/httpd.conf unless they specifically name /etc/apache2/httpd.conf. </ul>
            • mkdir ~/Sites/melodemo/htdocs
            • mkdir ~/Sites/melodemo/htdocs/blog1
            • chmod ugo+rwx ~/Sites/melodemo/htdocs/blog1
            • mkdir ~/Sites/melodemo/cgi
            • mkdir ~/Sites/melodemo/db
            • chmod ugo+rwx ~/Sites/melodemo/db
            • Edit httpd.conf, and make it contain this: </ul>
              <VirtualHost *:80>
                  ServerName macbook.local
                  ServerAlias localhost
                  DocumentRoot /Users/kevin/Sites/melodemo/htdocs
                  DirectoryIndex index.html
                  <Directory /Users/kevin/Sites/melodemo/htdocs>
                      Order allow,deny
                      Allow from all
                      AllowOverride All
                      Options Indexes FollowSymLinks MultiViews
                      AddHandler application/x-httpd-php .php .html
              ScriptAlias /cgi/ /Users/kevin/Sites/melodemo/cgi/
              Alias /static/ /Users/kevin/Sites/melodemo/htdocs/mt-static/
              AllowEncodedSlashes On
              <Directory "/Users/kevin/Sites/melodemo/cgi">
                  AllowOverride All
                  Options None
                  Order allow,deny
                  Allow from all
                  Options FollowSymLinks
              <Directory "/Users/kevin/Sites/melodemo/htdocs">
                  AllowOverride All
                  Options +Indexes
                  Order allow,deny
                  Allow from all
                  Options FollowSymLinks
              SetEnv PERL5LIB /opt/local/lib/perl5/site_perl/5.12.3/darwin-multi-2level:/opt/local/lib/perl5/site_perl/5.12.3
              #SetEnv MAGICK_HOME /usr/local/ImageMagick-6.4.0
              #SetEnv DYLD_LIBRARY_PATH /usr/local/ImageMagick-6.4.0/lib
              • Run "perldoc perllocal" to see where it installed your Perl libraries. Probably something like "/opt/local/lib/perl5/site_perl/5.12.3".
              • Update the SetEnv for PERL5LIB to include your Perl libraries.
              • sudo apachectl configtest
              • sudo apachectl restart
              • Create a sample ~/Sites/melodemo/htdocs/index.html and make sure you can browse it via http://localhost/index.html. Then delete the file.
              • open (double-click) in your Downloads folder. This will create a folder named Melody-v1.0.2.
              • Copy the *contents* of Melody-v1.0.2 into ~/Sites/melodemo/cgi
              • Move the *folder* ~/Sites/melodemo/cgi/mt-static to ~/Sites/melodemo/htdocs/
              • chmod go+rwx mt-static/
              • chmod go+rwx mt-static/support/
              • Copy ~/Sites/melodemo/cgi/config.cgi-original to config.cgi
              • Make the following changes to config.cgi:
                • Change CGIPath to point to http://localhost/cgi/
                • Change StaticWebPath to point to http://localhost/static/
                • Add an entry: "StaticFilePath /Users/kevin/Sites/melodemo/htdocs/mt-static"
                • Comment out the entries for PostgreSQL and mysql
                • Change the SQLite Database to point to /Users/kevin/Sites/melodemo/db/data </ul>
                • Browse to http://localhost/cgi/check.cgi
                • Everything should report success, except possibly "DBD::SQLite2"
                • Configure Melody:
                  • Set up an Administrator account. Browse to http://localhost/cgi/index.cgi and enter:
                    • Username: administrator
                    • Display Name: The Administrator
                    • Email Address:
                    • Password: password
                    • Password confirm: password
                    • Submit the form, and continue. </ul>
                    • Set up a blog. Enter:
                      • Blog Name: My First Blog
                      • Blog URL: http://localhost/blog1/
                      • Publishing Path: /Users/kevin/Sites/melodemo/htdocs/blog1
                      • Template Set: (whatever you like)
                      • Timezone: (as appropriate for your time zone)
                      • Submit the form </ul> </ul>
                      • Once you get a page with "Installation complete!", click "Sign in to Melody".
                      • You'll get a "Time to Upgrade!" page. Click on "Begin Upgrade"
                      • Sign in as administrator
                      • When you get "Upgrade complete!", click on "Return to Melody"
                      • Click on the "Write your first post" link, and create something. </ul> At this point, http://localhost/cgi/index.cgi shows you the admin interface and http://localhost/blog1 shows you the non-logged-in user interface.