The Un-Server: Using A MacBook
I started following through with some of my 2008 resolutions. First thing was to finally take the time to program our thermostat. I set it to 59 degrees at 10:00 PM, then to turn up to 64 at 7:00 AM, down to 62 again at 10:00, up to 64 at 5:00.
I may adjust the times a bit later, but gosh it was nice to wake up to a warm house (well, warm by our standards).
Then I tackled the Linux server. As I said previously, I had two goals in mind: I hate that thing sucking electricity when it isn't being used and I need and want to upgrade its OS. Its main use is as a "deep backup" server - daily backups don't go here, but weeklies do. Obviously that's easy enough to deal with: turn it on once a week. But there's a secondary function: it is a daily backup for Quickbooks running on my wife's PC. It also runs a little web based tool I use to track prepaid hours and their consumption by my clients.
These two things mean that I'd need to be quick in upgrading the Linux - I can't live with a few days down. But I don't want to be rushed. I want to take my time and do this at my leisure. Hmmm.. conflict. What to do?
Well, why not use my MacBook for the daily backups and the cgi app? It's always on, it just sleeps when I'm not using it. If my wife needs to wake it up because she wants to back up her checkbook, she just needs to open the cover. And later, if I get to my other goal of killing all power to this area when nobody is using it, the MacBook won't be bothered by that either. Sounds like a great idea!
So, step one: turn on File Sharing and Web Sharing in System Preferences. The Mac automatically creates shared folders for all the users on the machine, but I got rid of those and created one share: Backups. By default, the Mac only turns on AFP (Apple File Protocol) sharing. As I have no other Macs right now, I shut that off and turned on SMB sharing. I don't need FTP sharing, so I left that off. Now to test. At a terminal window I typed: "smbclient -L Macbook". It prompted for a password, I gave it my user login password, and it spit back.
Good, that was easy. Now to the PC. I could add the PC user as a user here, but it's just as easy to map a network drive and use "Connect as a different user" using my login and password (she knows it anyway). But when I went to try that from the PC, it wouldn't connect.
That had to be the firewall, and of course it was. The Mac had been set "Allow only essential services", but I needed to specifically allow File and Web Sharing. I made that change, and the mapped drive popped up. Ok, on to the Web Server!
Leopard's main web-server lives in /library/web-server. There you will find three directories: CGI-Executables, Document and share. My application is mostly just cgi scripts, so I could have just copied them into CGI-Executables from the Linux server, but as long as I was here I decided to rewrite a few things and do some cleanup and new features that I had wanted for a while. That took a few hours, but soon enough I had that app running locally as I wanted.
Wow. I can turn off the Linux server. It hasn't been deliberately shut off since we moved here two years ago. Oh, a few power failures have crashed us (yes, I really should get that UPS), but other than that, its been chugging away.. I typed "init 0" and soon after the low hum of its drives disappeared from my background noise.
Well, that's enough for one day. I'll work on the upgrade as I have the time and ambition. It backs itself up to a Rev drive, so I can tear right into it without thinking about losing anything. It hasn't had a CD drive installed for some time; I must have had to steal that for some long forgotten purpose, so I will need to buy that to do any new OS installation.. but I'll deal with that another day.
*Originally published at APLawrence.com
View All Articles by A.P. Lawrence
Our Daily Email of Breaking eBusiness News
About the Author:
A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com
WebProNews RSS Feed
More Expert Articles Articles