It is good to use a tuning machine to get exactly the right note. Tune as follows :
1st string D - 2nd string B - 3rd string G - 4th string D - 5th string G
Then you must fine tune the strings.
Fret each string as the following. They should each have exactly the same pitch as the 5th G string:
1st string on 5th fret - 2nd string on 8th fret - 3rd string on 12th fret - 4th string on 17th fret.
Hot tip
When you change strings, tighten each new string several times after the first tuning, pull it up from the fingerboard with your finger. This will help to stabilize tension on the tailpiece, bridge, nut and tuning peg and thus eliminate problems with tuning.