Today, we were supposed to wrap up our opening series on turning your Mac mini into a full-fledged Internet hosting (or staging) server… but I’ve changed my mind. More than 10,000 visitors showed interest in our articles last week, and more than half of them were from the Windows World. So I’ve decided to continue beating the dead horse a bit longer. We’ll add a couple installments each week until we fill up everyone’s hard disks. You’ll notice we’ve changed from Parts to Chapters. That indicates our intention to continue building on what we’ve already done for some time to come. Think of this as a college class that you don’t have to pay for … or attend, for that matter. And, just like college, we’ll slack off when Spring Fever hits. And, when June rolls around, don’t expect much until next fall. We will wave to you from the beach house, however.

If you’re just finding our site, you can read the entire series of articles (preferably from the bottom up) by selecting the Internet/Web Category on Nerd Vittles. We also encourage a look around while you’re here. After all, you wouldn’t want your Mac mini to grow up to be just a one trick pony. Our series on Home Automation and Computer Telephony servers can put a Mac mini to good use during those idle cycles. We might even get you interested in photography one of these days, perhaps this summer. And then you can really bore your friends with two nerdy pastimes.

Coming Attractions. Tomorrow, for Mardi Gras, we’ll be covering RSS, a much better way to keep current with blogs and especially HOW-TO web sites like this one. We’ll tell you why. On Wednesday, we’ll add another chapter to our ISP-In-A-Box series by installing Webalizer, a statistical analysis package with the best bar graphs and pie charts west of the Pecos. On Thursday we’ll address hardware-based firewalls and routers to protect your new system, and we’ll cover all the nitty gritty details to actually get you a domain set up on the Internet so that folks like me can start looking at your web site. If you don’t yet have a web site, don’t worry. We’ll tackle that next week. And then on Friday of this week we’ll have another ISP-In-A-Box feature covering how to install and make quick, free system backups for your Mac mini or any other Mac using any portable USB or Firewire hard disk … even your iPod. And, unlike Windows World, you can test your backup’s integrity by booting your Mac from the remote drive after the backup is complete.

WebMin, the Ultimate ISP Tool. In days of old, every operating system vendor wrote a proprietary user interface (UI) to make their OS "user-friendly." The trouble was that every time you switched operating systems, you had to learn an entirely new UI, too. Jamie Cameron changed all of that with the introduction of WebMin. If you have any previous experience with almost any flavor of BSD, Linux, IBM AIX, Sun Solaris or Java Desktop, then today’s topic will not be news to you. WebMin is one of the must-have tools on almost every server platform. What PhpMyAdmin did for MySQL, WebMin does for virtually every open source application in the marketplace. It provides a web front-end to manage almost everything running under the hood of your machine including cron jobs, bootup and shutdown processes, system logs, DNS, SSH Server, Apache web server, Postfix SMTP server, MySQL, PostgreSQL, NFS, SSL, Perl, and SAMBA to name a few. If you want to host multiple domains on a single server with Apache (including a Mac mini), nothing can come close to WebMin for quick, reliable, and automatic Apache configuration. As was true with PhpMyAdmin, powerful tools pose powerful risks if (1) you don’t know what you’re doing or (2) you don’t consider security before installation. WebMin includes its own web server which runs on port 10000 by default. You either need to enable the firewall on your Mac mini and leave port 10000 closed or you need to install a firewall/router between your Mac mini and the Internet and leave port 10000 closed. This will assure that no one can get to WebMin except sitting in front of your machine. And you’ll still need a username and password to get in. That’s about as secure as life gets these days. So let’s begin the installation.

First, we need to download the WebMin software. Go to prdownloads.sourceforge.net/webadmin/ and scroll to the bottom of the list. We want to download the latest and greatest version which includes support for Mac OS X v10.3: webmin-1.180.tar.gz. If you’re reading this months from now, there may be a later one. If so, get it in the tar.gz format. Choose a mirror close to you and download the file to your desktop. Once the file has been downloaded, it will decompress in a couple minutes into a folder with the same name as the original file: webmin-1.180. At the present time, there are 182 items in the folder. Your mileage may vary if a new version comes out down the road. Now drag the entire folder to your Applications folder.

We’ll need to get our hands dirty a little bit to complete the installation so just follow along and don’t get ahead of us. Go to the Applications/Utilities folder and open a Terminal window. Type sudo su and press enter. If prompted, type your admin password to switch to root access. Now move to the webmin installation folder: cd /Applications/webmin-1.180. Start the installation script by typing ./setup.sh and press enter. Don’t forget the leading period! You’re now going to be asked a series of questions. Listed below are the questions (in bold) followed by the corrrect answers (in italics) for you to provide:

  • Config file directory /etc/webminpress enter
  • Log file directory /var/webminpress enter
  • Full path to perl /usr/bin/perlpress enter
  • Web server port (10000)press enter
  • Login name (admin)press enter
  • Login passwordtype your admin password and press enter
  • Password againtype your admin password again and press enter
  • Start Webmin at boot timetype y and press enter
  • The installation script then will whirrr away for a minute or two. Be patient! WebMin will then tell you it’s finished and give you a couple little pieces of information that you need to either write down or bookmark this page.

  • 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 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 from -YES- to -NO- and click the Save button. That should get you started with WebMin.

    Vindication At Last: ISP-In-A-Box Performance. Privately, I’ve caught more than a little grief from colleagues suggesting that the Mac mini really isn’t up to snuff to handle some of the tasks we’ve been throwing at it this past week. Well, the testing results are in comparing a Mac mini to a 1.8GHz dual-G5 using the industry-standard Apache Bench application. According to Macminicolo.net, which handles colocation services for servers of all flavors, "While [Mac mini] figures aren’t at the top end of the generally available ISP-class web server performance curve by any means, the economics of the Mac mini are such that for the first time ever there is a competitive Macintosh server able to handle more than 1000 hits per second yielding 20Mbits of data at a price that meets or beats much of the industry…"

    PHP/MySQL Book List. I promised last week to put together a reading list to get you started with PHP and MySQL. There are a number of books that cover both topics together which is a good way to learn PHP and MySQL. My favorite is PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide by Larry Ullman. There’s also a little more advanced O’Reilley book on the subject: Web Database Applications with PHP & MySQL, 2nd Edition. You can’t go wrong with either one, or just buy them both and skip that romantic dinner out next week. Heh heh heh.

    Print Friendly, PDF & Email

    Be Sociable, Share!