Mark the locations of each post, placing one at each corner and 62 to 72 inches apart on long edges. Check the handrail manufacturer's directions for the distance that works best with the handrail.
Install 4-by-4 pressure treated posts at each location marked. Use U-brackets to install the posts on a wood deck or a concrete post mounting kit to install the post on a concrete deck. You will need a drill and either a wood bit or concrete bit to drill holes in the deck and the post.
Slip the vinyl post towers over the posts, if you are using them, and bolt them in place. You can also install vinyl handrails directly to a wooden post that has been treated with a deck finish.
Measure the distance between the first two posts with a tape measure. Mark this distance on each rail. To keep up a uniform appearance, center the measurement so that you remove the same amount from each end of the rail. For installation on stairs, lay the rail on the stairs and mark the angle of the posts on the rail. Cut each rail at the measurement marks you made with a miter saw.
Mark the locations of the top and bottom rail brackets at the height required by your building codes. Install the rail brackets onto the posts at this location.
Slide the bottom rail into the brackets and install the pickets, if your railing has them. Slide the top rail in place, lining up the pickets. Install the post caps.