The photo below shows the door frame placed in the opening and you should have about 1/4 to 3/8 inch around the frame to the rough opening for shimming the door and frame. With a standard door adding 2 inches to the width and height will provide the right size rough opening
The next step is to make sure the head jamb is level. This will make sure that the final installation will come out right. If the head jamb is not level and you plumb the side jambs, your door frame will be out of square and the door won't fit properly. If the head jamb is out of level then you need to place a shim under the side jamb that is low in order to bring the head jamb into level. The photo below is an example of what we're talking about. By missing this first simple step I've seen many installations take twice as long because the installer started by plumbing the side jambs.

|