Use the link below for the guides and references. You didn't specify what version you were installing so I couldn't link the exact install guide. Those links should get you started assuming you have the physical server infrastructure in place, the cucm ova file and iso.
Cisco Live doc for UCM 12.x
Cisco Live doc for Enterprise Dial Plan Fundamentals
CUCM/IM&P installation guide covers all the steps for installation of first node and subsequent nodes.
As to what to do if a SUB fails, that depends on whether you have a DRS backup or not. If you have a DRS backup, refer to that documentation for further information.