Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) narrated: We complained to the Prophet (peace and blessings be upon him) about remaining unmarried (celibate). He said: "Get married, and whoever is not able should fast, for it is a shield (curbing desire) for him."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10135