Two simple steps:

Install the beep utility. Executing beep on the command line will make the internal speaker beep.

apt-get install beep

Add pcspkr to /etc/modules to load it at boot time. You can load it manually by executing

modprobe pcspkr