Optimal procedures for the installation of a unit subject to stochastic failures