You can use the serversetup tool in /System/Library/ServerSetup/ to set the serial number for a Mac OS X Server. Provided the ServerSetup directory is your working directory you can then use the serversetup tool to configure the serial number
./serversetup -setServerSerialNumber “XSVR-105-000-N-xxx-xxx-xxx-xxx-xxx-xxx-x|Charles Edge|318”
Once the serial number has been set you can then get the serial number using the following command no matter the working directory:
/System/Library/ServerSetup/ -getServerSerialNumber