Converting the Mini to a Server: Preliminaries

The Mac Mini ships with both Apache, PHP, and MySQL preinstalled. However they’re relatively old versions, and I want something a little more up-to-date for this site. So the first step to migrating is to get the latest versions of those installed. Annoyingly, fink is not yet ready for Intel Macs; so that’s going to make everything quite a bit more complex.

The Mac Mini doesn’t ship with gcc, so before I can compile those, I’ll need to install the developer tools. Looks like XCode 2.2.1 is on Mac OS X Install Disc 1. Simple enough. Looks like it includes gcc 3.3 and 4.0. That’s nice. I’ll have more to say about gcc 4.1 on The Cafes soon.

Next up. Download, compile, and install Apache 2.0.55. (1.3 is too old and missing too many features. I thought about 2.2, but it’s too new and too many extensions don’t work with it yet.) First I should find the Apache config options I used on the old server. I know I wrote them down somewhere. Oh damn. Looks like they’re on the Mac whose DKM I borrowed to work on the Mini. I knew I should have bought that Belkin Flip KVM already. Hmm, maybe not. Looks like it only has a VGA port even though pretty much every Mac made in the last three years including the Mini use DVI. Newegg has a Linkskey USB DVI KVM for about $140.

In the meantime, let’s see if I can least set this up as a headless server. Then I can use the monitor on my main Mac, while using Chicken of the VNC and ssh to manage the Mini. OK. That’s set up. What happens now? Big surprise. It doesn’t work! I can’t seem to connect using ssh, VNC, or FTP. I’ll spare you the half hour of cursing and muttering and jump straight to the answer. “Have you tried turning it off and on again?” More specifically, have I tried turning ssh, ftp, and VNC off an on again? It seems sshd and other daemons failed to launch at system startup like they were supposed to. Instead the console generated these error messages:

Mar 6 19:07:17 elliotte-rusty-harolds-computer sshd[192]: error: setsockopt SO_KEEPALIVE: Socket operation on non-socket
Mar 6 19:07:17 elliotte-rusty-harolds-computer sshd[192]: warning: can’t get client address: Socket operation on non-socket

Turning those services off and on again after the computer had booted allows me to connect. Hypothesis: the wireless network is started after sshd, ftpd, and VNC in the boot process. Hopefully once I connect the Ethernet cable, this will take care of itself.

OK, with that little digression out of the way, let’s get back to compiling Apache. More on that in Part 2 of this series.

4 Responses to “Converting the Mini to a Server: Preliminaries”

  1. Stephen Says:

    For PowerPC Macs, MAMP is a nice solution for getting a current LAMP stack set up. It gives you the recent stable versions of everything pre-compiled, and a nice quick GUI for starting/stopping the different parts. Unfortunately it doesn’t look like they have a Universal setup for it yet.

  2. Mokka mit Schlag » Converting a Mini to a Server, Part 2: Installing Apache Says:

    […] To summarize what has gone before, I now have headless, network access to the mini, gcc installed, and have found my preferred set of Apache config options. For future reference they are: –prefix=/usr/httpd –enable-auth-anon –enable-auth-digest –enable-auth-dbm –enable-deflate –enable-expires –enable-headers –enable-mime-magic –enable-rewrite –enable-speling –enable-ssl –enable-unique-id –enable-usertrack –enable-vhost-alias –enable-include –enable-so […]

  3. Elliotte Rusty Harold Says:

    MAMP does look very nice. (Adding Zend to the current mix on this server would be cool.) However, I’m afraid the lack of a Universal Binary is a deal breaker for the moment.

  4. Mokka mit Schlag » Converting a Mini to a Server, Part 3: MySQL and PHP Says:

    […] To summarize what has gone before, I now have headless, network access to a Mac X86 Mini, and have successfully installed Apache 2.0.55. The next step is to install MySQL, PHP, and WordPress; then copy The Cafes and from the old server to the Mini. […]

Leave a Reply