The Mac OS Xclave

 

 

 

 

 

 

 

 

main page

 

Information briefs

macos x server

macos x (client)

darwin

netboot

 

Installation reports

PHP 3

PHP 4 (Zend)

MySQL

Python
(coming soon)

 

Special Reports

Apple Media Event
10/99
new iMacs
and MacOS 9

1999 wwdc keynote

Quick and Dirty
MacOS X Server
Installaion Guide

 

Articles

 

News Archive

1999

1998

RhapNet
(coming soon)

 

Advertising info

 

Contact Us

 

About Us

 

Links

 

The Tweak List

 

 

 

 

The quick and dirty Internet server solution:

by: Mark J. Hershenson (markhers@macnn.com)

 

Last night after nights and nights and nights of constant frustration about how my MacOS X Server box was working, I decided to (for the first time in months) gut it and start over again. I had two purposes in mind:

  1. I wanted to do it to clear up space and reorganize the hard drive without doing it by hand since I HATE Workspace Manager
     
  2. It's about time we had a quick-and-dirty around here…

So, last night in the span of a good three hours I reinstalled MacOS X Server, and installed the following software:
 

  • MacOS X Server patch 1 - Would have installed Patch 2, but I've heard too many complaints...

     

  • PHP 4.0b2 - a.k.a. Zend - the PHP Hypertext Preprocessor, which we have displayed prominently as of late, including being the server-side scripting language which runs this entire site.

     

  • Python 1.5.2 - an object-oriented programming language which has increasingly become a popular one with Web-programmers and regular programmers alike. In addition to standalone usage, and CGI utility, Python is also the basis for Zope, a popular OO server-side scripting language. (Zope is not yet available for MacOS X Server)

     

  • MySQL 3.22.25 - The popular, powerful SQL engine which works on MacOS X Server. Using Anjo Krank's amazing Pthread->Cthread library, and our stick-to-it-iveness at compiling 3.22.25, MySQL is not only a great SQL server, but a great database attached to PHP 4.0b2.

     

  • Fortune - Yeah, that's right. Fortune. If there are any Apple engineers, marketing people, or UNIX junkies, let's lobby to get this as a base install package in the future!

 

First off, I installed MacOS X Server over again. After it installed, and I rebooted after being walked through the set-up program, I rebooted.

Then I set up personal workspace preferences. Faster mouse action. Shorter key-repeat delay, faster key-repeat. Monitor setting, and fixed up my Login Window .nib file so that it only cycles through username, password, and enter. (If you want to know how to do this, let me know. Real simple, but not necessarily for the weak of heart since if you do it wrong, you can't log in!)

Oh, yes, and then I ate dinner.

Now on to the fun stuff.

I will assume for this quick-and-dirty that you have a properly working MacOS X Server configuration with proper Ethernet configuration and all that jazz.

If you don't have access to the Internet from your MacOS X Server box, check out our workaround page.

 

 

 

 

 

 

 

 

 

First off, download the MacOS X Server Update 1.0-1 to /tmp.

The update fixes up the installation by updating some files, as well as NetBooting and QuickTime Streaming Server software.

(If you are adventurous, you can also download the 1.0-2 patch, which is much bigger and has reportedly created a number of new bugs in its wake. We are not condoning downloading the new patch until we learn more…)

In Terminal:

cd /tmp
gnutar MacOSXServer1.0-1.pkg.tar

In Workspace Manager:

Switch to /tmp, and double click on the Package. It will load the installer. Click Install. You're done. Yeah!!!!!!!!!!!

 

 

 

 

 

 

 

 

 

Now onto MySQL 3.22.25.

Note: We have to install this before PHP. You'll see why in a couple of minutes…

Download the MySQL binary to /tmp.

Download the precompiled version of Anjo Krank's great Pthread --> Cthread wrapper package to /tmp.

In Terminal:

cd /tmp
gnutar xpzf MySQL-MXS.tar.gz
gnutar xpzf MySQL-pthread.tar.gz
mkdir /usr/local/mysql
mv /tmp/libpthread.dylib /usr/lib/libpthread.dylib
mv /tmp/libpthread.A.dylib /usr/lib/libpthread.A.dylib

In Workspace Manager:

Open a "viewer" and switch it to /tmp
Open another "viewer" and switch it to /usr/local/mysql
Select the folders
bin, include, info, lib, libexec, share, and var in the "/tmp" viewer, and drag the "7 items" icon to /usr/local/mysql

For more information on putting the final touches on your MySQL installation, check out out dedicated MySQL on MacOS X Server page

 

 

 

 

 

 

 

 

 

PHP 4.0b2 comes next. If you want MySQL connectivity, you have to install MySQL first so that the libraries are available when you compile PHP.

In Terminal:

mkdir /usr/local/src

Download the PHP 4.0b2 (Zend) source code to /usr/local/src. This way, if you would want to recompile PHP with different options at another time, it's there. Trust me.

In Terminal:

cd /usr/local/src
gnutar xpzf php-4.0b2.tar.gz
cd php-4.0b2
./configure --with-apxs=/usr/sbin/apxs --enable-track-vars --enable-magic-quotes --with-config-path=/usr/local/lib --disable-url-fopen-wrapper --with-mysql=/usr/local/mysql --disable-debug --without-gd --quiet
make

(Note: If you actually have GD installed on your system, you can omit the --without-gd tag. If you don't know GD from P.D. or REM, don't worry about this…)

The --quiet tag will silence the…well, crap that configure usually spits out. You won't need to check any of the results anyway unless there are problems. If you do, however, run into problems, run the command above but omit "--quiet" tag to find out where configure tripped up at. But this won't happen, right? Right!

You may run into an instance where dlist.c returns an error that it cannot find the library malloc.h. I don't know why this happens, but it does.

To fix it, do "pico functions/dlist.c", and scroll down to the header declarations and replace 

#include <malloc.h>

with

#include "/System/Library/Frameworks/System.framework/Versions/B/Headers/bsd/sys/malloc.h"

If make stops, try typing make once or twice. If you are stuck on an error, however, you have probably encountered a rare and weird problem. The solution to such problems always start with flogging yourself with a fish. After that, you can ask us for help.

In Terminal:

make install
pico /Local/Library/WebServer/Configuration/apache.conf

Type Control-W, and search for "DirectoryIndex" - this will bring you to the first change you will have to make.

Change the line to include .php .php4 .phtml .php3 and/or any other PHP suffixes you might want to use.

Then type Control-W and search for "AddType application/x-httpd-php"

This will bring you to a commented out line. DON'T USE THE COMMENTED OUT LINE. Instead, type by hand

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

The first line makes Apache use the PHP module for any files which end with .php or .phtml. Again, add whatever else suffixes you might want to use with PHP.

The second line is to display pretty PHP syntax for all files which end in .phps. You'll learn more about this when you play around more with PHP.

After all that work, type Control-X, "yes", and hit return. This will save the file and exit Pico.

In Terminal:

apachectl graceful

If you've followed these instructions to the letter, you should see a message which says the server restarted. Yeah!

 

 

 

 

 

 

 

 

 

And now Python 1.5.2.

Easy easy easy. Download the Python source code to /usr/local/src (or /tmp if you don't care to store the source code).

In Terminal:

cd *directory you chose*
gnutar xpzf Python-1.5.2.tar.gz
cd Python-1.5.2
./configure --with-host=powerpc-apple-netbsd &endash;silent

The with-host (*#$ is because the installer doesn't understand Rhapsody, or it's needs…and it has needs, people. So, instead it just uses the template for a PowerPC chip and NetBSD. If you are thinking that this sounds questionable, don't. This is quick and dirty!

In Terminal:

make
make install
ln -s /usr/local/lib/Python1.5 /usr/bin/python

The final line allows you to call python from the command line.

 

 

 

 

 

 

 

 

 

And finally, to paraphrase the as-yet-unreleased movie "Outside Providence", this installation isn't over until we get your cookies...your fortune cookies anyway. :)

This package comes to you straight from Chris Saladhna who retooled a stock *BSD fortune installation to work with MacOS X Server. You can download the source from the Peanuts archive.

Download the source into /tmp

In Terminal:

cd /tmp
gnutar xpzf fortune.1.0.P.bsd.tar.gz
cd fortune
make
mkdir /usr/local/games/fortunes/
mv datfiles/* /usr/local/games/fortunes
mv fortune /usr/local/bin
mv strfile /usr/local/bin
mv unstr /usr/local/bin

If your really want to, you can copy the man files to their proper locations as well. Remember, though, that man is located at /usr/share/man/ and not /usr/local/man.

 

 

 

 

 

 

 

 

 

Well, that's all folks. Isn't this great? You have a server with a SQL server, a server-side scripting language, a great OO language, and the chance to laugh once in a while. Yeah!!!!!!

If you should have any suggestions for additional installs which you feel should be part of a Quick and Dirty, let me know!

 

 

 

 

 

 

 

 

 

All content - ©1998-2010 - Mark J. Hershenson

 

 

 

 

 

The MacOS Xclave is hosted by green-ant.com.