How was the Old Testament compiled? While this question is similar to this question, I'm certain the answer will be very different, and far more complex....

How was the Old Testament compiled?
The following is taken from a section of the Introduction in the "Complete Jewish Bible", English Version by David Stern, entitled The Canon


  Scholars agree that the canon of the Torah achieved its present form before the time of 'Ezra (around 445 B.C.E.), the Prophets later and the Writings last. But the final review of the canon was made by the Council of Yavneh (Jamnia) convened around 90 C.E. by Rabbi Yochanan Ben-Zakkai in the wake of the destruction of the temple by Romans twenty years earlier. Several books now included in the Tanakh were questioned—Daniel and Ezekiel, because of their startling visions and experiences; Esther, because God is not mentioned in it; Song of Songs, because of its overtly sexual character; and Ecclesiastes, because of its depressed world-viewpoint (except for the last two verses, which redeemed it). Ecclesiasticus (not the same as Ecclesiates) was rejected by the rabbis of Yavneh but is found in the Apocrypha, a collection of fifteen ancient Jewish books that include Tobit, Judith, 1-2 Maccabees and the Wisdom of Solomon. Catholic and Anglican Bibles include the Apocrypha. Some sixty other ancient books are collectively called the Pseudepigrapha. English language editions of the Apocrypha and the Pseudipigrapha are available.


There are several more pages of history regarding the formation of newer versions, New King James, etc. and the attribution of writings (who wrote which book) for the books of the Tanakh (Old Testament) in the Introduction I've sighted above. However, the passage above seems to best answer the question about the actual "compiling" of the Old Testament.