Debian AMD64 Setup
My Linux distribution of choice is Debian, although for the desktop I’d recommend Ubuntu. The server was first setup using the unofficial debian64 repositories. Since the amd64 architecture is now officially part of Debian, we moved to using an official repository. see Google groups. An unofficial repository contains /debian-amd64/ like so:
#deb http://mirror.espri.arizona.edu/debian-amd64/debian/ sarge main contrib #deb-src http://mirror.espri.arizona.edu/debian-amd64/debian/ sarge main contrib
Since packages make it to stable at a fairly slow pace, we also want to use the testing branch. This is fairly straightforward, first update your /etc/apt/sources.list to use etch/testing by removing (or commenting out) other repositories and adding the following lines. If you are outside the USA, replace the .us. part with your country code.
deb http://ftp.us.debian.org/debian testing main contrib deb-src http://ftp.us.debian.org/debian testing main contrib
Next, run apt-get to update the system, first clean the system, then update, and upgrade.
apt-get clean apt-get update apt-get dist-upgrade
Follow the onscreen instructions, when in doubt pick the default option or swithc to google and read up. If apt installs a new kernel, you’ll have to restart your server. Finally, to get up to date LAMP packages, you can use the dotdeb repositories by adding the following lines to your sources.list. We will need these later to install Apache2, MySQL, and PHP5.
deb http://dotdeb.netmirror.org/ stable all deb-src http://dotdeb.netmirror.org/ stable all
Since our last server crashed because of a very low max open files limit, its worth checking that this setting is not too low on the new server.
Currently this returns 100905, which should be more than enough open files for our expected traffic. See Debian kernel tuning for more info.
Finally, because the CPU is an Intel P4 with hyperthreading, you can try using an SMP kernel to enable the 2 “virtual” processors. While there seems to be some debate on the benefits of Intel’s hyperthreading, IBM produced some benchmarks on the 2.6.15 kernel which show some gains. You can install a new kernel with:
apt-get install linux-image-2.6.16-2-em64t-p4-smp
Make sure you install the correct one for your CPU, since there are a generic 64-bit kernel, AMD specific kernels, Intel specific kernels, as well as single and multi-processor versions for each.
That’s it for this part, if you restart you should still have a working server (I do). Still to do: basic system security and setting up a LAMP environment