Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Slash on Mac OS X

posted by pudge on 10:05 AM August 12th, 2003   Printer-friendly   Email story
This is how I installed Slash on Mac OS X Server 10.2.6 on August 8, 2003. YMMV. This is not intended to be a tutorial, it is a log of what I did for my system. You may wish to use a release version of perl, to include different Apache modules, to compile with DSO, etc. Whatever. If someone wants to take some or all of this information and include it in a more comprehensive guide, be my guest.

Note that I installed my own perl and Apache and mod_perl, I use fink for mysql and some of the libraries, and that I install the perl modules by hand.

Also note that for mod_perl, I added the --without-execstrip option, as Apache appears to be broken on Mac OS X, under some circumstances, without it (I got the undefined symbols warning for _ap_pstrndup, _ap_push_array, _perl_request_rec, _sv2request_rec when building Apache::Request/libapreq, as many others have).

When I previously built Slash for my PowerBook G4 running Mac OS X 10.2.x, I didn't need to do the execstrip thing. I don't know why. But now, on this machine, I do. I blame SCO.

  • download and unpack apache 1.3.28, mod_perl 1.28, perl 5.8.1 RC4

  • install perl in /usr/local

    	% sh Configure -Duseshrplib -des
    	% make ; make test
    	% make install

  • install fink

  • log out and log back in (connected via ssh) to get fink in environment

  • install fileutils (gives version of cp compatible with Slash makefile)

    	% fink install fileutils

  • install expat

    	% fink install expat

  • install mysql

    	% fink install mysql mysql-client mysql-dev mysql-shlibs

  • start mysql

    	% sudo true; sudo safe_mysqld &

  • create your slash database and users in mysql, and flush privileges (see INSTALL)

  • install Bundles in CPAN (NOT Bundle::Slash yet)

    	cpan> install Bundle::CPAN
    	cpan> reload cpan
    	cpan> install Bundle::libnet
    	cpan> install Bundle::LWP

  • install mod_perl/apache in /usr/local

    	perl Makefile.PL APACHE_SRC=../apache_1.3.28/src DO_HTTPD=1 USE_APACI=1 \
            PERL_MARK_WHERE=1 EVERYTHING=1 APACHE_PREFIX=/usr/local/apache \
            ADD_MODULE="headers,rewrite,usertrack" APACI_ARGS="--without-execstrip"
    NOTE: I had to move /etc/httpd/httpd.conf, Apple's default, out of the way and move /etc/httpd/httpd.conf.default into its place. I would've thought it would put the httpd.conf into /usr/local/apache/, but it did not. I dunno why, and at this point don't care.

  • XML::Parser needs some help finding the paths for fink:

    	cpan> look XML::Parser
    	# perl Makefile.PL EXPATLIBPATH=/sw/lib EXPATINCPATH=/sw/include
    	# make; make test
    	# sudo make install
    	# exit

  • DBD::mysql, Date::Manip, XML::Simple, Apache::DBI failed a tiny number of tests. I forced them.

    	cpan> force install DBD::mysql
    	cpan> force install Date::Manip
    	cpan> force install XML::Simple

  • Apache::Test and Apache::Request needed some handholding too.

    	cpan> look Apache::Test
    	# perl Makefile.PL -httpd /usr/local/apache/sbin/httpd
    	# make; make test
    	# make install
    	# exit
    	cpan> look Apache::Request
    	# ./configure --with-apache-include=/usr/local/apache/include/
    	# make
    	# make install
    	# perl Makefile.PL -httpd /usr/local/apache/sbin/httpd
    	# make; make test
    	# make install
    	# exit

  • Then, finally:

    	cpan> install Bundle::Slash

  • Install the rest of Slash as usual.

A final note, for now: if you try to re-build some of the Slash::Apache modules (that is: if you run "perl Makefile.PL" for Slash::Apache::User once you've already installed it), you will get errors from dyld. How I got around it: edit the installed Apache::ExtUtils module, in the command_table subroutine, comment out the 'require "$file.pm"' line.
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • For those of you who haven't been following the issue of how to get slash running on OS X, various Slashcode posters have been asking how to get it done for roughly 2 or 3 years now (essentially since the first preview of OS X was released). For the past year, a conflict between Apache::Cookie and Apache::Request on OS X has been the last obstacle to getting this done.

    If anyone has put off a Mac purchase because of this, aren't you glad you waited? Now you can get a G5 to run your site on (as if you nee

    • I have been running Mac OS X on my TiBook running Mac OS X 10.2.x for many months now ... I never had the libapreq conflict. I dunno why. Maybe I happened to use the nostrip option and I forgot about it. Oh well, now, for the record, here is a system that essentially works. :)
    • From previous questioning here, it seems the most important limiting factor to running slash is RAM. How much RAM can you address with 64 bits? :) And dual G5's ought to do real nicely serving a big site like Slashdot.

      On the other end, I've been given the impression that even a 7600/132 (since we're talking Macs) would be satisfactory for a more typical (read: less trafficked) slash site, given 256MB or more. So you're right, you don't need that much power.

      I wonder what the smallest machine that's ev

      --
      Constitutionally Correct [cpne.org] ⇐
  • Why even waste a Mac running slash? I'd would go get some cheap ass Pentium or Althon computer, slap FreeBSD or Linux on it, and run slash. I'd use the Mac for REAL things like web browsing, etc, etc......
    --

    --
    It's either on the beat or off the beat, it's that easy.
    • I have a Mac server running here already; it would be silly to NOT use it for Slash!
  • I am adding this to runtask, in parse_slash_sites():

    -     if ( $uid != $orig_euid or $gid != $orig_egid ) {
    +     # Mac OS X likes to have signed UIDs, so e.g. user
    +     # nobody will get UID 4294967294 from the system,
    +     # but $> will be -2.  fun fun fun!  but getpwuid(-2)
    +     # will give us 4294967294, so let's get it that way. -- pudge
    +     my($c_name, $c_pass, $c_uid, $c_gid) = getpwuid($uid);
    +

  • INSTALL.MacOSX in libapreq will have the note about not stripping (patch is in CVS now), and as I understand it, a patch for mod_perl's Makefile.PL will make it automatic that this bit is added when you build Apache via mod_perl.