This article will walk you through setting up a generic Pentium box to be a FreeBSD server suitable for a small embedded systems development team. Your box will need to have the following basic items:
You can get a computer like this for about $100 from any used computer dealer, or you might already have most of the parts lying around.
For a first-time installation, I'd suggest getting the FreeBSD 4.10 Production release rather than the FreeBSD 5.1 New Technology release. Everything you need to start off with is available from the 4.10-i386-mini.iso image available from this list of FreeBSD Mirrors
Don't do anything until you have had a good look at the Installation Chapter of the FreeSD Handbook. Take an evening and read over the installation guide carefully.
If possible boot the machine and enter the BIOS setup screens. Set the system clock to UTC time, and set the BIOS defaults to non-PNP OS and to the most conservative (if possible) optimizations.
Also, take the time to run a system check on things like memory and the hard drive using the utilities available on the Ultimate Boot CD. I use MemTest86 and whatever drive tester is appropriate for my drive. Then I set up CPUBurn to run at least overnight to really cook things.
Once you are ready to install FreeBSD, just follow along with the Installation Chapter of the FreeBSD Handbook. My primary goal is to make a minimal useful installation. The following points are choices I made in the installation procedure. For convenience, the section headers point to the right places in the FreeBSD Installation Guide.
4GB mounted as / 512MB swap 4GB mounted as /home 4GB mounted as /var 4GB mounted as /usr rest mounted as /snapshot
We're about to go headless, which means ditching the keyboard and monitor, but before we do, it's probably a good idea to make sure we can at least talk to the box, and it would even better if the box could talk to the rest of the network.
The checkout procedure assumes that the install went well, and that you have some other computers on your local area network. I'm going to use my local area network address (192.168.1.x) in the examples. Use whatever you have for your local adress if it's different.
First log in to your machine as sysadmin and see if you can ping another machine on your network:
ping 192.168.1.x
where x is the adress of some other machine that you know is on your network. Type CTRL-C to stop pinging. You should see something like:
PING 192.168.1.100 (192.168.1.100): 56 data bytes 64 bytes from 192.168.1.100: icmp_seq=0 ttl=64 time=7.269 ms 64 bytes from 192.168.1.100: icmp_seq=0 ttl=64 time=3.929 ms 64 bytes from 192.168.1.100: icmp_seq=0 ttl=64 time=3.669 ms 64 bytes from 192.168.1.100: icmp_seq=0 ttl=64 time=3.640 ms 64 bytes from 192.168.1.100: icmp_seq=0 ttl=64 time=4.326 ms ^C --- 192.168.1.100 ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max/stddev = 3.640/4.567/7.269/1.373 ms
Next, go to another computer on your network (It can be a Windows machine) and see if you can ping the FreeBSD box you just finished setting up. Under Windows, you can use the same command line, with the address of your new machine, of course) and see something like this:
Pinging 192.168.1.201 with 32 bytes of data:
Reply from 192.168.1.201: bytes=32 time<10ms TTL=64
Reply from 192.168.1.201: bytes=32 time=10ms TTL=64
Reply from 192.168.1.201: bytes=32 time<10ms TTL=64
Reply from 192.168.1.201: bytes=32 time<10ms TTL=64
Ping statistics for 192.168.1.201:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 10ms, Average = 2ms
Finally, check the ssh keys that were generated when the machine booted for the first time. You're sysadmin now, so elevate yourself to root and type the following command:
ssh-keygen -l -f /etc/ssh/ssh_host_key.pub
The result will look like this, which is the fingerprint of the key on my machine.
1024 1e:f1:cc:8e:bb:8b:bd:e0:6e:74:c1:bf:8d:59:9b:43 /etc/ssh/ssh_host_dsa_key.pub
Write this number down. We'll need it later to verify that the remote login is working properly.
The default security profile enables sendmail, but it won't work properly on systems that do not have a domain name. And you really don't need the headache of administering the sendmail system. To disable it, you can edit /etc/rc.conf and make sure the following line:
sendmail_enable="YES"
is changed to:
sendmail_enable="NONE"
If you've got this far, you're in good shape for the next installment, which is setting up your Windows workstation to access the FreeBSD server. If you're already running a *nix workstation on your desk, then you can skip it and move on.
In any case, turn off the machine from the root account by typing
shutdown -h now
When the screen says it is safe to do so, power down the machine. Now you can move it to its final location, but maybe you'll want to leave it out for a while if this is your first BSD box - just in case.