It is a well-known sunnah that Muslims should seek knowledge; the prophet himself would spread knowledge by teaching others (and recommend the same of his followers). All incidents I know thereof were informal.
Did the prophet ever formalize an education system (like modern classrooms) to teach in a structured manner? If not, when (and by who) was the first such institution established?