basic machinery alignment rules
1) bolt it down so you can use a precision level and avoid leaning on it as your weight can distort readings.
2) shims are common where it cannot be machined and equipment can be grouted with cement or epoxy for better support between shims
3) temperature expansion can seriously affect rail straightness. if a rail is warmer than whats supporting it the warm rail will expand and the extra length will cause rail to bow or snake. sometimes rails are slotted or in alignment grooves so expansion can occur but rails stay straight
4) rail parallelism is done with a tram gage, basically a rod with a inside micrometer or a rod with a dial indicator to see if distance between rails is the same. often a magnetic base and dial indicator can have magnetic base replaced with a block or angle and the rods, clamps and indicator can then be adjusted for different distances
they make tools for lumber sawmills. basically setting up equipment to run of rails or tracks and aligning feed rollers. short of using optical alignment surveying tools for smaller machines they have some of the best designed equipment i have seen.