Definatly, no, they do NOT follow each other closely. I won't say anything, as not to spoil anything for one who hasn't seen/read them, but no, definatly not.
The book deals a lot more with her life before, is much more inapproprite, and has a very different ending. There's maybe 100 pages that are even remotely similar.
I LOVED the musical (was a huge Idina Menzel fan from when she was in Rent, so I had to see it, and fell in love), so I figured I'd read the book. Hated it.
Totally different, and totally not for kids, like others have said.
Also, no happy ending. Whatsoever.
PS - Also, Fiyero is married in the books. BIG difference there.