Skip to content
Byrne Reese edited this page May 12, 2011 · 4 revisions

Installing Melody on a Mac OS System via Macports

This guide covers the procedures for installing Melody on a personal Mac computer.

Overview

What you will need

  • A Mac, MacBook, MacBook Pro, iMac, etc.
  • Administrative access
  • XCode installed
  • Macports installed

What will be done

Most Macs come pre-installed with many of the components you will need to run Melody, however, not all of them. This guide will take you through the process of installing the following components via MacPorts:

  • Perl
  • Some Apache2 modules
  • PHP5
  • ImageMagick
  • Perl Modules

Then we will walk you through the process of editing your Apache configuration files to get everything up and running.

Installation and Setup Instructions

  1. Install your ports. Each of the following ports are to be installed using the following command:

    prompt> sudo port install port_name

Install these ports (verbatim):

  • emacs [^1]
  • perl5.10
  • apache2 +no_startupitems
  • php5 +apache2 +mysql5 +pear
  • php5-curl
  • php5-mcrypt
  • php5-mysql
  • php5-openssl
  • ImageMagick +perl
  • p5-crypt-ssleay
  • p5-dbi
  • p5-dbd-mysql
  • p5-error
  • p5-html-parser
  • p5-html-tagset
  • p5-locale-gettext
  • p5-test-simple
  • p5-uri
  • p5-cgi
  • p5-image-size
  • p5-soap-lite
  • p5-file-temp
  • p5-crypt-dsa
  • p5-xml-atom
  • p5-archive-tar
  • p5-archive-zip
  • mysql5
  • mysql5-devel
  • mysql5-server

[^1]: Unless of course you are a masochist and use vi. :)

  1. Update Perl. With a newer version of Perl now installed on your system, you need to update your system to use it, in favor of the version of Perl that comes installed with your Mac. Execute these commands:

    prompt> sudo mv /usr/bin/perl /usr/bin/perl.orig prompt> ln -s /opt/local/bin/perl /usr/bin/perl

  2. Install additional Perl Modules. For each of the following Perl modules, you will need to execute the simple command sudo cpan <module name>. Some of the modules below have additional prerequisites, and some have a lot of them. Be sure to "follow" and install all necessary prerequisites. Pay close attention to what is output to the console and make sure all the perl modules are installed properly. If a module is not installed, resolve the issue prior to continuing. See Installing Perl Modules." Now, install these modules:

    • Bundle::CPAN
    • Convert::PEM
    • Crypt::DSA
    • Mail::Sendmail
    • IPC::Run
    • Cache::Memcached
    • Cache::Memcached::Fast
    • XML::XPath
    • JSON::XS

This is the most time consuming part of the installation. So go get a coffee or something. Be careful not to leave the terminal unattended for too long though because it will prompt you from time to time.

  1. Download Melody. This part should be easy right?

  2. Install Melody. You will need to download the latest version of Melody from openmelody.org, and then copy the files into the proper location.

    prompt> cd ~/Downloads prompt> unzip melody-v1.0.0.zip prompt> cp -pR melody-v1.0.0 ~/Sites/melody

  3. Edit Your Apache Config.

Edit this file: /private/etc/apache2/users/YOUR_USERNAME.conf

And add the following to it:

<Directory "/Users/YOUR_USERNAME/Sites/">
    Options Indexes MultiViews ExecCGI FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

This will allow you to access Melody from the following URL to complete the installation:

http://localhost/~YOUR_USERNAME/melody/

Appendix A: Configuration Files

The following section contains all of the various configuration files you will need:

Yum Repositories

The following file should be placed in /etc/yum.repos.d/mt-CentOS-Extras.repo

Apache Configuration File

The following file should be placed in /etc/httpd/conf.d/mt.conf

  • Replace "127.0.0.1" with the IP address of your server

  • Replace www.somedomain.com with the domain name of your server.

  • Replace yourname@somedomain.com with your email address.

    <VirtualHost 127.0.0.1:80> ServerName www.somedomain.com DocumentRoot /var/www/vhosts/www.somedomain.com/htdocs/ ServerAdmin yourname@somedomain.com DirectoryIndex index.php index.html CustomLog /var/log/mt/access_log common ErrorLog /var/log/mt/error_log LogLevel info RewriteEngine on # rewrite rules go here php_value magic_quotes_gpc off AddHandler fcgid-script .fcgi AddHandler cgi-script .cgi
    Alias /cgi-bin/ /var/www/vhosts/www.somedomain.com/cgi-bin/
    <Directory /var/www/vhosts/www.somedomain.com/cgi-bin/> Options ExecCGI FollowSymLinks Includes AllowOverride Limit Order allow,deny
    Allow from all

vhost.conf (Media Temple)

See also: http://kb.parallels.com/article_41_432_en.html

DirectoryIndex index.php index.html
LogLevel info
<IfModule mod_rewrite.c>
     RewriteEngine on
     # rewrite rules go here
</IfModule>
<IfModule php5_module>
     php_value magic_quotes_gpc off
</IfModule>
AddHandler cgi-script .cgi
Alias /cgi-bin/ /var/www/vhosts/somedomain.com/cgi-bin/
<Directory /var/www/vhosts/somedomain.com/cgi-bin/>
     Options ExecCGI FollowSymLinks Includes
     AllowOverride Limit
     Order allow,deny
     Allow from all
</Directory>

Melody Config

The following file should be appended to /var/www/vhosts/www.somedomain.com/cgi-bin/config.cgi

AdminScript mt.fcgi
CommentScript comments.fcgi
TrackbackScript tb.fcgi
SearchScript search.fcgi
ViewScript view.fcgi

 


Questions, comments, can't find something? Let us know at our community outpost on Get Satisfaction.

Credits

  • Author: Six Apart Ltd., Byrne Reese
  • Edited by: Violet Bliss Dietz
Clone this wiki locally