Posted by Ward Mundy on May 6th, 2005
For those of you who have been following our ISP-In-A-Box series on Nerd Vittles, today is a big day. On Nerd Vittles this morning we upgraded the original Mac mini to Tiger. Now let’s rework the Top 10 ISP-In-A-Box server applications that we built at Nerd Vittles earlier this year so they’ll all work with Tiger. It took us a little more than an hour to upgrade Panther to Tiger, and it’ll take about one more hour for you to read this article and get all of the applications below upgraded. Incidentally, the ISP-In-A-Box tutorials work for virtually any Mac … but you knew that.

Apache Web Server
Email Servers: SMTP, POP3, and IMAP
MySQL Database Server
PHP and PhpMyAdmin
WebMin and The Webalizer
Web Calendars and Email Reminders
Crontab and CronniX
WordPress 1.5 Blog
Prerequisites. For purposes of this article, we’re assuming you’ve already upgraded your Mac to Tiger. If not, visit our Nerd Vittles site first. You also already should have installed whichever applications above that you want to use. This tutorial won’t help you if you’ve already installed Tiger and now want to install some of the applications above. We’ll do that in the coming weeks. So, if there are still some apps you want and you’re still running Panther, click on the appropriate links above, and do the installs before upgrading to Tiger. Also make certain that any of the applications you’ve installed actually work under Panther. Don’t upgrade to Tiger until they do. Finally, you’ll need $9.95 if you want to enable any or all of the email servers using PostFix Enabler for Tiger. You only really need the SMTP mail server if you’re planning to use the Email Reminders or the WordPress blog application.
We’re going to take things a little quicker here than we did at Nerd Vittles. If you get confused or forgot how to do something, just go back and read the original article about the application we’re upgrading. So let’s get started.
Configuring the Apache Web Server for Tiger. Before enabling Apache on your Mac running Tiger, let’s make a couple of quick changes in the Apache config file. Open a Terminal window and switch to root user access: sudo su. Now change to the directory with the Apache config file: cd /etc/httpd. Make a copy of the config file for safekeeping: cp httpd.conf httpd.conf.tiger.save. Open the config file for careful editing: pico httpd.conf. Search for php: Ctrl-W,php,enter. Delete the pound sign (#) at the beginning of the line which reads “LoadModule php4_module …” by placing the cursor over # and pressing Ctrl-D. While you’re there, delete the pound sign on the line above for Perl. We’ll be needing Perl for WebMin. Now search for the third occurrence of php: Ctrl-W,enter,Ctrl-W,enter. You should be positioned on “AddModule mod_php4.c.” If not, keep searching until you find it. Put the cursor over the pound sign (#) at the beginning of the line and press Ctrl-D. Do the same thing for the AddModule mod_perl.c line above it. Now save the file: Ctrl-X,y,enter. Close the Terminal window: Command-Q.
Enabling Apache Web Server for Tiger. To start up the Apache web server under Tiger, open SystemPreferences->Sharing and place a check mark beside Personal Web Sharing. That was hard, wasn’t it. If you previously enabled Apache before starting here today, then disable it and then restart it to assure that the configuration changes take effect. You now should be able to access all of the web sites we built in the ISP-In-A-Box series.
Enabling Mail Servers for Tiger. There was a great little application called PostFix Enabler that we used to get the SMTP, POP, and IMAP mail servers running with Panther on your Mac mini. Well, it no longer works, but there’s a new version. Be sure to download 1.1.5 which now works with Tiger 10.4.1 since 10.4.1 broke the original release for Tiger. It used to be donation-ware. Now you have to donate … $9.95. Whoopee! If you want mail servers with no hassles, skip lunch and pay the piper using PayPal. The download site is here. Download the software and run it once. Leave the defaults and click Enable Postfix if it’s not already selected. I had to actually Disable Postfix, exit the program, restart the program, and then Enable Postfix again to get everything working. Send a test message using localhost as your SMTP server. You’re done. If you want POP3 and IMAP servers, read the notes in our Panther article about where to look for configuration info.
Enabling MySQL Database Server for Tiger. If you installed MySQL with Panther following our Panther tutorial and if you chose the Tiger Upgrade option, then MySQL still is running and hasn’t missed a beat. How’s that for an upgrade?
Enabling PHP and phpMyAdmin for Tiger. If you performed the Apache configuration steps above, then PHP and phpMyAdmin are fully operational now that you have enabled Apache. You can verify that everything is working by recreating the test4u.php file which we covered in the Panther tutorial. For security reasons, don’t forget to delete it once everything checks out. You also should be able to access your phpMyAdmin application from your server: http://localhost/php/. Is this hard enough yet?
Enabling WebMin for Tiger. WebMin is a little more difficult to get running. We’ll need to download the latest version and reinstall it. Go to this site and scroll to the bottom of the list. Download the latest version, webmin-1.180.tar.gz, in the tar format. Choose a mirror close to you and download the file to your desktop. Since StuffIt is no longer included with Tiger, you’ll end up with webmin-1.200.tar on your desktop. Now drag this file to your Applications folder. Open a Terminal window and move to the Applications folder: cd /Applications. Now switch to root user access: sudo su. Decompress the tar ball: tar -xf webmin-1.200.tar. This will create a new webmin-1.200 subfolder in your Applications folder. Move to the WebMin installation folder: cd webmin-1.200. Start the installation script by typing ./setup.sh and press enter. Don’t forget the leading period! You’re now going to be prompted for the location for Webmin. LEAVE THE DEFAULT and it will upgrade your existing copy of Webmin from Panther. Listed below is the question (in bold) followed by the corrrect answer (in italics) for you to provide:
Config file directory /etc/webmin … press enter
The installation script then will whirrr away upgrading WebMin for less than a minute. Be patient! Don’t touch anything. WebMin will then tell you it’s finished. Here’s the information that you will need for future reference:
To uninstall WebMin, open a Terminal window, sudo su, provide admin password, and run this script: /etc/webmin/uninstall.sh
To manually stop WebMin, open a Terminal window, sudo su, provide admin password, and run this program: /etc/webmin/stop
To manually start WebMin, open a Terminal window, sudo su, provide admin password, and run this program: /etc/webmin/start
To access WebMin with a web browser, go to http://localhost:10000 or http://127.0.0.1:10000 or http://nnn.nnn.nnn.nnn:10000 where nnn.nnn.nnn.nnn is your Mac’s IP address
Now we’re ready to see if things are working properly. Open a web browser and go to one of the addresses above. You should be prompted for a username and password. Type admin for your username and type your admin password. Don’t save it … but you knew that! You should see the WebMin opening page. Now that wasn’t so bad, was it?
WebMin WARNING: WebMin has a deceptively simple user interface, and you may be tempted to muck around and improve things. Don’t … until you first RTFM (read the manual)! Or go to your favorite bookstore and thumb through a few of the many great books on WebMin. Pick one that best suits your reading style. They all pretty much cover the territory.
WebMin Housekeeping. WebMin updates are released periodically. You can get on the mailing list at webmin.com. Once you know of an update, here’s the process to get it and install it. Nothing could be simpler. Open WebMin with your web browser. Go to Webmin, Webmin Configuration, Upgrade Webmin. Move to the third form on the page which is labeled Update Modules Now. Run the test to see what you’re missing by leaving the defaults and clicking the Update Modules button. WebMin will then check for updates and tell you what you’re missing. Go back to the Update Modules section again, uncheck the “Only show …” option and check the “Install Modules …” option. Then click the Update Modules button again. The new modules will be installed. You’ll need to do this once after this install because there is at least one update available. If you don’t get on the mailing list, then you need to go through this drill about once a month. I would not turn on the automatic updates. If the WebMin update server gets compromised, you are toast!
Finally, a word about whether to run WebMin all the time. If you have a gig of RAM, it won’t hurt. With anything less, I would turn it off until I needed it. That means you probably don’t want it to start up when you boot your machine. You then can manually start it with the command shown above. Here’s how to enable or disable the automatic boot of Webmin. Open WebMin in your browser. Go to System, Bootup and Shutdown, and click on WebMin in the alphabetical list. Change the startup setting to either -YES- or -NO- and click the Save button. That should get you started with WebMin.
It’s now safe to delete your old Tiger installation folder for WebMin. Just open your Applications folder from the Desktop and drag the webmin-1.180 folder to the Trash.
Enabling The Webalizer for Tiger. Things get a little smoother here on out. Webalizer that was installed under Tiger is still working except we’ll have to manually make the correction to the Apache web log format again. Here’s how.
Open a Terminal window by going to your Applications/Utilities folder and clicking Terminal. Switch to root user access: sudo su. Provide your admin password if prompted. Now move to the directory where the Apache configuration file is stored: cd /etc/httpd. Make a copy of the existing config file just in case something goes wrong: cp httpd.conf httpd.conf.tiger.save2. Then you could copy it back if you need to. Now edit the config file: pico httpd.conf. Be careful here! Let’s first find where we need to make our logfile format change: Ctrl-W, logformat, and then enter. Now press the down-arrow key exactly 12 times. You should be at the beginning of a line which reads: CustomLog “/private/var/log/httpd/access_log” common. Insert a pound sign at the beginning of this line by pressing #. Now press the down-arrow key exactly 13 times. You should be at the beginning of a line which reads: #CustomLog “/private/var/log/httpd/access_log” combined. Delete the pound sign at the beginning of this line by pressing Ctrl-D. The # sign should disappear. Now save your changes: Ctrl-X, Y, and press enter.
We’ve configured Apache to generate log entries in the new format, but we still have the original Tiger log file in the old format. So let’s rename it. Move to the Apache log file directory: cd /var/log/httpd. Now rename the log file: mv access_log access_log.save. To generate a new empty log file in the new format, we need to restart Apache: Click on the Apple icon in the upper-left corner of your screen, choose System Preferences, and click on the Sharing folder. Uncheck the check box beside Personal Web Sharing and wait for your web server to shut down. Now check the check box beside Personal Web Sharing to restart Apache. Command-Q closes System Preferences.
Apple didn’t mess with our crontab file during the Tiger upgrade so our cron job will kick off daily to update your Webalizer statistics. You can look at your Webalizer charts any time you like by going to the following site with your web browser: localhost/webalizer/.
Enabling Web Calendars for Tiger. Guess what. Your web calendars still work at localhost/ical/. You don’t have to touch a thing, and the crontab job will update your web calendar information from your iCal data every day.
Enabling Email Reminders with Tiger. Must be your lucky day. Your email reminders still work at localhost/emrem/. And the hourly cron job to email you notices is still running as well.
Crontab and CronniX for Tiger. Yep. Crontab and CronniX still work, too. And all of your cron jobs have been left just as they were with Panther. In fact, nothing has changed except CronniX now appears in your Applications folder as CronniX.app.
Enabling WordPress 1.5 Blog for Tiger. And, last but not least, your WordPress blog is still alive and well at localhost/blog/. Incidentally, Tiger Vittles is a WordPress 1.5 blog, too. And, if you haven’t looked since our Panther article on WordPress, there now are more than a hundred new themes available here for WordPress 1.5. So … Keep on Bloggin’.
That takes care of upgrading the first ten ISP-In-A-Box projects for Tiger. We’ll tackle some more next week. Enjoy!
Main, Mac, OSX, Tiger, Apache, PHP, Postfix, WordPress, Blog, MySQL, Upgrades | 2 Comments »