Building A Major Scale
Just like with building triads, building a major scale is about understanding the intervals between each note of the scale. If you understand this, you can build any major scale.
All major scales follow this pattern:
(W = Whole Step, H = Half Step)
W - W - H - W - W - W - H
So let's look at the notes of a C major scale. They are shown below with the interval between each note in parenthesis:
C (W) D (W) E (H) F (W) G (W) A (W) B (H) C
A good way to practice is to just pick a random note on the keyboard and then build your major scale. Learning your scales this way will make sure you don't ever forget the notes in a major scale.