Tread lightly on the things of earth
Mike James' Radio weblog (2002) about computing, politics, and faith




 

Building a Perl 5.8.0, mod_perl, Apache, and PHP web development system in Jaguar

A week ago I posted about building a Perl 5.8.0/Apache/mod_perl/PHP web development setup in Mac OS X 10.2.x Jaguar. Further testing revealed that Aaron's otherwise excellent Perl 5.8.0 installer contains a threaded perl, which is incompatible with DBI. No DBI, no talkie to MovableType's mysql datastore. DBI is essential to me, so I need a nonthreaded perl-5.8.0.

DECISION: I'll build/install an unthreaded perl 5.8.0 in /opt/perl, separate from Apple's default perl 5.6.0 installation in /usr, so a future Apple software update doesn't mess up my install. (This is consistent with my current build method for apache in /opt/apache.) Further, I'm choosing to leave Apple's /System/Library/Perl untouched and to install modules in /Library/Perl/${version}--not in /opt/perl/...-- as suggested/implied in Wilfredo's updated hints/darwin.sh below.

  1. Restore Apple's OSX 10.2.2 virgin perl 5.6.0:
    cd /
    sudo gnutar xpzvf /Library/PerlBackup/perl-v5.6.0-10.2.2-virgin.tar.gz

    (as created by Aaron's Perl 5.8.0 installer on a Lombard's fresh OSX 10.2.2 install, the tarball for which you can retrieve here)
  2. Build Perl: Start with Morbus Iff's Perl 5.8.0 build instructions, but with this variation:

    Use Wilfredo Sanchez's updated perl-5.8.0/hints/darwin.sh (24 Sep 2002) as mentioned here.

    In Wilfredo's updated darwin.sh, change the default prefix, site prefix, and vendorprefix from /usr/local to /opt/perl, and leave "where to put modules" unchanged, as below:

    # Default install; use non-system directories
    prefix='/opt/perl'; # Built-in perl uses /usr
    siteprefix='/opt/perl';
    vendorprefix='/opt/perl'; usevendorprefix='define';

    # Where to put modules.
    privlib="/Library/Perl/${version}"; # Built-in perl uses /System/Library/Perl
    sitelib="/Library/Perl/${version}";
    vendorlib="/Network/Library/Perl/${version}";

    I'm assuming that if prefix isn't set to /usr then the succeeding '/usr' case (not shown above) is ignored, so I'm leaving the '/usr' case content as is.

  3. Now back to following Morbus Iff's Perl 5.8.0 build instructions, starting at Installation.

    I used

    ./Configure -de -Dperladmin='mwjames@basileia.local.' -Dcf_email=mwjames@example.com -Dotherlibdirs=~/Library/Perl

    The 'make' appeared to complete successfully.

    The 'make test' showed all 'ok' down to

    lib/Shell............................ <hung here>

    (This problem has already been noted on 2002-10-09 by Linc Davis.)

  4. I installed anyway (sudo make install).
  5. Finally, I symlinked the new perl binaries to their "usual" location:

    sudo ln -s /opt/perl/bin/* /usr/local/bin/


  6. Now continue with mod_perl, Apache, and PHP building, as before:

  7. Build mod_perl then Apache using David Wheeler's article, Build Your Own Apache Server with mod_perl. I varied from David's build instructions only by adding these apache configure parameters:
    --prefix=/opt/apache/l.3.27
    --enable-module=most
    --enable-shared=max
  8. Build PHP 4.2.3 using Marc Liyanage's PHP 4.2.x build instructions to create a libphp4.so module for apache.




Click here to visit the Radio UserLand website.
Click to see the XML version of this web page.
Click here to send an email to the editor of this weblog.
© Copyright 2003 Mike James.
Last update: 1/1/03; 11:52:10 PM.