1) Do you have to use a sliding rail when mounting a server in a rack cabinet, or Can you just screw the machine directly into the cabinet?
2) What size are the screws that go in the front and back of the server?
1) Do you have to use a sliding rail when mounting a server in a rack cabinet, or Can you just screw the machine directly into the cabinet?
2) What size are the screws that go in the front and back of the server?
For a server, you typically will need some kind of rails. There are rather "generic" models which are in fact just L-formed brackets fixed permanently to the rack's profile rails.
And there are manufacturer/model-specific rail models which, combined with a cable management arm (typically also model-specific), would allow for an easy pullout of the machine for maintenance.
In my experience, the latter "pullout" models are clearly preferable due to much easier access for regular or irregular maintenance tasks like adding / replacing memory, fans or CPUs - even more so if you do not have hot-plug drives or need access to the backplane for some reason.
The size of the screws depends on the rail chosen. Some have completely screwless snap-in installation (like HP's), most will have M6 screws, some will use M5 screws, both in conjunction with cage nuts fitting your rack's profile rail holes (there are round and square models)
Depends on the equipment. There certainly is equipment that can be mounted directly or with fixed rails.
Depends on the rack. If you have square-hole, then you usually need to buy cage-nuts, and matched bolts, if you don't have rails specifically designed to snap-in to the square holes.
See http://en.wikipedia.org/wiki/19-inch_rack for details and links to hardware specs for various standard racks.