You really should find out what your local GW or other hobby store will do for you. Like I said, my local GW lets you sit in their store and use their paint, free ( as long as you brought your own models and brushes ). If they do that, they'll probably have the tools and glue you need for assembly, too. They might even lend you their primer spray, if you ask nicely.
Maybe this varies from place to place - I wouldn't know. Which is why you gotta find out!
The same goes for necessary books. Like I mentioned earlier, the stores I've been to have had store copies of codices for people to flip through. If they do, there's no real reason you have to get it right away. Now, they might have store rules saying you have to bring your own codex if you're going to play in their store. And they might have the same thing for the core rules. Again, I think this varies from place to place, so ask. If having the rules book isn't a requirement, don't buy it right away. Get to know the basics of the rules ( for instance by having the staff give you a quick demonstration of the game ), and then tell people you're going to play against you only know the basics. I've never owned a 40K rules book in my life, but I've still played a few games.
In short: Buy only what you have to. It could be as little as your own models.
Or you might need to get all the stuff yourself. Finding out ahead of time could potentially cut the cost of getting into the game in half, though, so it's worth checking out.