As I understand it, the D5000 does NOT have an auto-focus motor built into the camera body, i.e. similar to the D40/40x. If that's the case, then you can safely mount ANY Nikkor lens designed for the Nikon F (non-AI as well as AI). You cannot auto focus, and you cannot meter, i.e. Manual Exposure is the only mode which will work.
So, focus manually and guess at the proper shutter speed / aperture (appropriate for the ISO setting). Review in the LCD and adjust accordingly. I've experimented with a 50mm F/1.4 Nikkor-S (a tank of a lens) mounted onto a Nikon D40x. Works fine, like a mild telephoto.
Now, if you had a Nikon D90 or D80, a camera with a built-in autofocus motor, you CANNOT mount a non-AI lens with damaging the camera. So, don't do it! You can safely mount all other Nikkor lenses.
FYI, non-AI refers to "non - Auto Index". Prior to the introduction of the Nikkor AI lenses in the 1970s, Nikon used metal "rabbit ears" to tell the camera's built-in exposure meter the F stop setting.
Check out Ken Rockwell's web site on Nikon Lens Compatibility:
for a more definitive discussion.
Best wishes and by all means, use that older Nikon glass. There are many bargain lenses available, which though heavier are better constructed than many of today's Nikon lenses, especially the kit lenses.