Qin Dynasty: Appointed by Jue Di according to his military achievements.
Han dynasty: the procuratorial system selected talents from all over the country (basically hearsay)
During the Three Kingdoms and the Jin Dynasty: Nine-class Zheng Zhi System (basically in origin)
Sui Dynasty: The imperial examination system was abolished.
The imperial examination was established when Wu Zetian perfected the imperial examination system in the Tang Dynasty.