I owned a d7000 in the past so I don't have the hands-on for the lower models. With a d7000, there was 3 custom lens profiles you could save for non-AI lenses. My quick searches do not show if the d5000 is capable of that.
Without profiles, you should be still able to use fully-manual. That means turn off auto-focus on body, set mode to M. Adjust f-stop to f/8 since most mirror reflex lenses are fixed at f/8. Turn off auto-ISO. Your exposure control will be setting shutter speed manually. Take test photo, adjust speed. Use the histogram for fine-tuning the exposure.
If you do have custom lens profiles, read up in user manual how to set it. But once done auto-ISO can be turned on and you can then use Aperture-priority auto-exposure mode (A-mode) set at f/8. Still manually focusing.