In the Lutheran Church - Missouri Synod, the educational requirements are a bachelors degree, and masters of divinity degree from one of the two synodical seminaries, including a third year (of four) vicarage at a local congregation where they participate as an assistant pastor, including preaching and assisting in administering the sacraments under the close supervision of the local pastor.
Alternatively, there is a more individualized colloquy program, a fast-track for men that do not fit the normal profile who want to become pastors in the LCMS, such as graduates from other Lutheran seminaries, ordained pastors from other synods, other traditions or denominations, or deacons in the LCMS that wish to advance to pastor.
Doctorates are available for those who wish to continue their education after MDiv.
Only men are eligible for the ministry, the vast majority are married, and there are all the stipulations and morality clauses one would expect. Single pastors are required to be celebate, but may pursue marriage if they desire. Theoretically, a former homosexual who has repented of that lifestyle and has either married (a woman of course) or who is celebate would not be excluded from the ministry strictly for that reason, as long as they remained repentant. Same with any other gross or public sinful activity.
Additionally, all rostered pastors in the LCMS are required to affirm a complete and unqualified subscription to the confessions of the Lutheran church as contained in the Book of Concord.