After I'd finished final year in school last year, they employed me to produce a 50th anniversary book (350 page publication). We put the book together ourselves, and got it printed by a publisher. It was then just sold in local book shops and privately within the school. Around 2500 copies were printed. It took a big marketing effort by a few other staff members who worked voluntarily. So it is certainly possible to do it privately. Causes a few grey hairs though!!
It really depends on how big a project you're undertaking. If it's a speciality book being sold to a small local target market then self publishing might be the most cost effective way. If you're trying to make it a major publication (novel etc) then you're probably better off getting an agent.