Setting Up Your Mac Mini Server Like Your Livelihood Depends On It — Especially if It Does
This post kicks off a series of articles describing how you might go about setting up a new Mac Mini running OS X Server. Although aimed partly at folks interested in replacing a WHM/cPanel server with a Mac running OS X Server, the general approach is applicable regardless of what platform — if any — you might be moving from.
If your livelihood depends on keeping your server ticking over happily, you’ll understand why my general approach is conservative, repetitive, and slow. It means holding back from switching things on that you might want to try out straight away, and it means not switching anything on unless you absolutely require it. The general approach begins with software updates and setting up a backup and recovery procedure right from the start, continues with more backup and recovery, then configuring some basic environmental settings, enhancing security, and installing additional software that will be needed to bring the server up to speed for normal usage — and that’s all before even launching Server.app.
And speaking of additional software: here again, the approach I follow avoids installing anything extra that we don’t need, and not modifying anything that could be overwritten by a future software update unless we really have to. This includes not installing extra package managers if we don’t need them. Some of the walkthroughs I provide for getting this or that up and running will differ from what you’ll read elsewhere specifically because I’m not assuming you’re running MacPorts, Homebrew, or whatever. (There’s nothing inherently wrong with either of those, of course!)
The approach continues with one-step-at-a-time setup and enabling of services or portions of services, alternating with regular checks of the logs to watch for any potential problems and fixing them or in some cases simply noting them as they arise.
It’s then on to improving OS X Server performance with a wide variety of tweaks. In many cases, I cannot for the life of me understand why Apple would ship Server.app with such performance-sapping settings, when a few modifications here and there can radically improve performance. Next up are some suggestions for minor modifications that might be needed to existing PHP code which may have built with certain assumptions in mind about where things are stored — such as there being a siloed, site-specific directory one level above each site’s web root. (There isn’t one: on OS X Server, this space is shared by all sites.) This is all before attempting to host anything serious on the server.
Finally, with all that in hand, it’s time to move on to actually hosting something — moving existing sites from a WHM/cPanel server, moving database-driven sites in particular, and so on.
Along the way, I also take a look at a few necessities such as replacing cron
jobs with launchd
on OS X Server, and a few extras like how to set up server-side mail processing scripts, should you need them.
This series of articles isn’t by any means intended to be a complete walkthrough of everything you’d ever want to do on OS X Server — far from it! Rather, it’s a beginning, a sequence of steps which I believe offers a fairly solid first pass at getting websites up and running in a reliable and easily-managed fashion. The web abounds with other, broader resources on OS X Server, including of course Apple’s own ‘Advanced Administration Guide‘ for OS X Server, and the “Server Help” available from the “Help” menu of Server.app. (Unfortunately, Apple’s body of documentation does include several errors, so it’s best to read it with a critical eye and double-check anything that doesn’t seem quite right.)
All material on this site is carefully reviewed, but its accuracy cannot be guaranteed, and some suggestions offered here might just be silly ideas. For best results, please do your own checking and verifying. This specific article was last reviewed or updated by Greg on .
https://codedmemes.com/lib/setting-up-mac-mini-server-intro/