In order to change the keyboard layout of a linux machine persistently, making it survive also a reboot, the file /etc/conf.d/keymaps has to be changed.
There you can find the options KEYMAP, which has to be changed to one of the keymaps found in /usr/share/keymaps and subfolders.
For example if the keyboard has to be set to a default german layout, you can use:
KEYMAP="de-latin1-nodeadkeys"
or
KEYMAP="de-latin1".
Once you restart the machine, the layout will be applied.
For temporarily changing the layout, you can use the loadkeys command:
loadkeys /usr/share/keymaps/i386/qwertz/de-latin1-nodeadkeys.kmap.gz
It is also possible, that the keymaps are located in the following folder:
/usr/share/kbd/keymaps/i386/