5.1.2??? Wow that's old! I assume the hardware is also very old. Do you intend to use new hardware for this upgrade?
If so, the best way would be to build the new server and try and back-up and restore but this may be difficult if there is a lot of data.
I don't think you can do an in-place upgrade directly from 5.1.2 -> 7.X. You may need to do that in steps. You can get older CD's from here:
http://public.www.planetmirror.com/pub/e-smith/releases/WARNING!!!: MAKE SURE YOU BACK UP (AND VERIFY) ALL YOUR DATA BEFORE ATTEMPTING THE FOLLOWING!!!
WARNING!!!: MAKE SURE AND REMOVE ANY EXTRA CONTRIBS BEFORE ATTEMPTING ANY IN-PLACE UPGRADES.
IIRC you have to do it this way because you can't go from 5.1.2 -> 5.6 OR 6.0.1 but I may be wrong. One of the Devs can chime in and correct me.
5.1.2 -> 5.5 -> 5.6 -> 6.0.1 -> 7.1
OR possibly you can skip 5.5:
5.1.2 -> 5.6 -> 6.0.1 -> 7.1
If the server is customized, then you are going to have some challenges. There are many threads covering heavily modified 6.x -> 7.X upgrades. Some successful and other not so successful.
I WILL SAY IT ONE MORE TIME...BACK UP YOUR DATA BEFORE DOING ANYTHING!!!