Exterior Prehung Door Installation (Home Improvement Camp).
How to Install an Exterior Door (House Improvements.com. This video shows flashing techniques.)
Same pattern as for window, do this before the decking.
First measure the space of the door. Make sure the door will fit (although in truth, if you are just doing this now it will be too late if something is wrong -- this should be done while framing the wall).
Place the door in the openinbg with one person on the inside and one on the outside. Make sure the door can be open and shut, and that there is a gap all the way around the perimeter of the door. Apply beads of caulking underneath the door threshold as well as to the back side of the brick molding attached to the door. Put the door into place.
Shim the door as necessary so that the door is plumb, but also so all the gaps between the door and the door jamb are uniform all the way around. Once this is true, secure the door in place using 3 inch screws. These screws are screwed through the door frame into the framing. Always have hard shims between the door and wall framing wherever screws are installed. Some of the screws can be consealed under the little black weatherstripping flap around the door. At each hinge (and there should be hard shims between the door and the wall framing at each hinge location), remove one hinge screw and replace it with a longer 3" screw to connect these points to the house framing.
Once again test to make sure the door can comfortably open and close. If not then add screws to adjust it.
As you install the screws, periodically check to insure the door continues to open and close well, and that door alignment does not shift.
Install the screws under the flap.
See the replaced screw.
When installing trim be sure to leave a consistent reveal for the door frame. 1/4" - 1/2" reveal is typical. Door trim comes together at a 45-degree angle at the upper corners. I recommend starting on the edge with the hinges because that will be a handy way to set how much of the door you don't cover with the trim. Don't nail in the trim until all pieces are cut and tested. Use the finish nailer and finishing nails to attach it. Get help to hold the pieces up as needed.