Installing A Server/Considerations
Ideal Setup
- Motherboard
- 1 GigE port (1 GigE + 1 FastE/Wireless recommended)
- 2 SATA-3 ports (4 SATA-6 recommended)
- 1GB of RAM (2GB recommended)
- CPU
- low-watt 25W-45W CPU (ultra-low-watt 7W-13W recommended)
- Storage
- optical drive (permanent connection not necessary)
- Primary drive: about 2x the storage you use now
- Backup drive: about 4x the storage you use now
(½TB = $40, 1TB = $60, 2TB = $80)
Cost:Benefit Analysis
Is it really worth it to set out and build a whole computer just to serve a very specific set of duties? Probably not, as the cost for buying all the computer parts new will be at least US$250. However, buying new usually isn't how people get started with using Linux as a server. It usually starts with enough old parts to build a new computer.
CPU Power Draw (Atom/Nano/Fusion)
This isn't to say there's no benefit whatsoever. If you plan on running a server 24/7 you can potentialy save a lot of money by purchasing a new ultra-low-watt CPU instead of re-using a standard desktop CPU. Of course, this depends on how much you pay for electricity.
CPU Wattage | 7.5₵/KWH | 10₵/KWH | 12.5₵/KWH | 15$/KWH | 17.5₵/KWH | 20₵/KWH | 30₵/KWH |
---|---|---|---|---|---|---|---|
95W | $62.42 | $83.22 | $104.03 | $124.83 | $145.64 | $166.44 | $249.66 |
45W | $29.57 | $39.42 | $49.28 | $59.13 | $68.99 | $78.44 | $118.26 |
25W | $16.43 | $21.90 | $27.38 | $32.85 | $38.33 | $43.80 | $65.70 |
13W | $8.54 | $11.39 | $14.24 | $17.08 | $19.93 | $22.78 | $34.16 |
7W | $4.60 | $6.13 | $7.67 | $9.20 | $10.73 | $12.26 | $18.40 |
At the low-price end, it would take four years and a difference of 88 watts to make the purchase of a completely new computer financially sound. At the high-price end (namely Hawaii), the same difference can be felt within one year and just about any difference of at least 20 watts can be justified over a four-year period.
Hard Drive Power Draw (To RAID Or Not To RAID?)
It might make sense at first to re-use an older drive and purchase a new drive of similar size to put together in a RAID0 array. However, keep in mind that newer mechanical hard drives draw at least 3 watts when idle and at least 10 watts when active, and older hard drives can draw even more. It comes down to the power draw of the drives you have now and the drives you plan to purchase, and (again) your electrical rate. An extra 3 watts over four years can cost between $7.89 and $31.54. With the difference in doubling your capacity from ½TB to 1TB to 2TB being only $20, it might make more sense to go with a new higher-capacity drive.
Keeping Up With Updates
Normal/Security Updates
Once you have your server up and running, it's easy to forget to log in and check for updates. You might be tempted to run a cron job to do this automatically, but don't. While many Linux distros will stop and restart a daemon if the package receives an update, kernel updates requre a manual reboot. Also, you will miss any change notices like command or config option deprecation. You'll really be scratching your head when the switch-over time from the author has expired and something magically no longer works.
Distribution Upgrades
Another headache you will experience is with distribution upgrades. Most Linux distributions use a point-release system that freezes the software packages at a certain point. What this means is that you will not see any major upgrade for any software package after the version's release. Worse yet, while you will continue to receive security updates, even those will be cut off eventually.
- Arch -- Rolling release, always current and supported
- Never worry about distribution upgrades
- Changes require a watchful eye (*.pacnew files)
- Ubuntu -- 6-month release cycle, 5-year support (LTS server)
- Longest support for security updates, can skip every other LTS release
- Can leave packages out-of-date (albeit patched)
- Debian -- 2-year release cycle (with various point releases), 3-year support
- Point releases keep you up on the latest software
- Support term leaves you in the middle of the the next version's life cycle, effectively giving you a 2-year upgrade cycle.
- openSUSE -- 8-month release cycle, 1½-year support
- Less changing than Debian
- Forced upgrade every other release (16 months)
- Fedora -- 6-month release cycle, 13-month support
- Can skip every other release
- 6-month release cycle means you'll be upgrading every year
Network Performance
PCI / PCIe
Most consumer motherboards do not push PCI past 33MHz. Even on motherboards that use a 66MHz PCI bus, care must be taken to have a 66MHz ethernet adapter and no 33HMz devices on the same bus as the bus will run at the lowest common denominator. A PCI bus running at 33MHz has 1.06Gb/s of theoretical bandwidth, and a 66MHz PCI bus has a 2.12GB/s theoretical bandwidth. However, PCI bus communications are not bidirectional and only one device can use the bus at any given time.
In order to ensure a shot at maximum performance, your motherboard should sport at least one PCI-Express slot. Weirdly, the same manufacturers that will cheap-out on PCIe because no PCIe slots are present seem to lump all the high-speed stuff onto PCIe once it's there.
Network Traffic
If you have two (or more) network interfaces and your server will be interfacing with both the internet and a local network, consider separating the traffic. If you only have one interface, you should consider either getting an ethernet expansion card or USB wireless dongle. PCI ethernet cards can cost as little as $8, but you will need an ethernet cable that reaches your router or switch, and at that point a $12 USB wireless adapter may be cheaper.
Installation to USB Keys
BIOS Support
Keep in mind that some older boards may not be able to boot from a USB device at all, or may only support booting from USB hard disk and optical drives. If this is the case, you can usually install the boot loader on a supported drive and have the boot options point to the flash drive.
File System
The best choice for a flash drive file system is ext4 with journaling turned off. This can be accomplished with
mkfs -L [label] -T ext4 -O ^has_journal /dev/sdxx
Arch Linux
Arch Linux has trouble installing directly onto USB flash drives sometimes. Success or failure will not be apparent until after the installer finishes installing files to the drive. If this is the case for you, here's a work-around.
- Grab a spare hard disk drive that can be over-written without worry.
- Copy over your flash drive's partition scheme using dd if=/dev/sdb of=/dev/sda bs=512 count=1.
- Install Arch Linux to the hard drive.
- When you get to Configure System, be sure to add usb (right after udev to the hooks in /etc/mkinitcpio.conf
- Copy the hard disk drive back over using dd if=/dev/sda of=/dev/sdb bs=512
- Before rebooting, be sure to either wipe out the hard disk partition (using dd) or change its UUID (using tune2fs).
Uvesafb
Distributions are starting to include uvesafb support in their kernels. With no configuration uvesafb will use the highest possible resolution once udev finds a monitor with EDID information. This can make text hard or impossible to read at higher resolutions. Some monitors don't like how uvesafb does its resolutions. And lastly, there and still bugs. You can resort to text mode by pressing [TAB] at the installer's boot menu and adding nomodeset to the boot line.