Saturday, 4 December 2010

Web serving from home (Part 1)

In an earlier post, I mentioned that I was going to lose my long time web home at --- Since I was long gone from caip, I suppose it was about time. So, what was I going to do for a replacement? I decided maybe now was the time to take it into my own hands...

Sometime earlier I had acquired a Sun Netra T1 as a possible web machine. I had an X1 in mind, but the T1 was certainly cheap enough. It's packaged in a nice 1U box and has a very simple interface to the outside world. Two ethernet ports, a serial port and that's about it. My machine didn't have a disk but included one sled. Good thing. I happened to have a stockpile of 40 GB disks, so I installed it in the machine. Good, what next? Software, that's what. I decided to go for OpenBSD because (a) it's a BSD derivative and I know BSD from my grad skool days (b) The price is right (c) it's said to be very secure. But how do I get it onto my disk? Fortunately for me, I had torn apart a PC and had a CD-ROM available. So, I plugged it into the second IDE slot and powered the machine up. Oh yes, and connected the serial port to my lab PC.

The machine came to life easily enough but proceeded to put my in the Sun Lights Out Monitor (LOM). The LOM is yet another supervisor layer for the machine --- reminds me of the PDP-11/45 used on the PDP-10/L ... So, the problem was as soon as I told it to boot from the cdrom (in the console) then it would complain about the Fast MMU error. I'd seen this before --- a long time before but couldn't remember what it was. Google to the rescue. I found a post that claimed that this error was due to a missing password in the LOM. You've got to be kidding. But what had I to lose? I created a password and tried again. Still failed. Ah! Maybe I should logout and log back in? You guessed it. It worked. So, there I was booting from the CD-ROM and writing to the disk. I couldn't believe it.

I installed OpenBSD and it all worked. But then I changed my mind about the disk allocation. Maybe I should put most of the space for web pages? It was almost trivial to go back and re-install. After that, I had to work on the ethernet interfaces. I wanted to have two ports: one for the router and one for the local machines but decided it really didn't make much difference. So one port it was. OpenBSD comes ready to serve pages: it already has Apache on it. So, I really didn't need to install any packages. In addition, I decided to move the services served by my own machine to this server (such as BOOTP, RARP and friends). I easily moved them over.

Finally, I was looking at a reasonably nice machine. I was impressed at how fast it served pages. It seemed fairly secure. I enabled samba for the local house machines but turned it off for everyone else (this will turn out to be important). Finally, I decided it was time to remove the CD-ROM and put the lid back on. The next and final step would be to place it on the net ...

No comments: