If the door is in China, it will be fixed with anchor bolts. If the door of any other production, will need welding machine. Door frame with the door is installed in a doorway, and are using level measured the correct vertical position of the door frame. You can do without the level. To do this, open the door, and if any of its open position, it should not be movable. If there is any movement in the direction of closing, or vice versa in the direction of opening the door, corrects the curvature of the door frame.Once the door is in the correct, upright position, fasten it with anchor bolts or by means of fittings bars driven into the wall.
The opening between the door and the wall, should be filled with a special foam. But here it is necessary to take into account, that the foam may distort the frame itself. Therefore, the foam is needed, in small amounts, and between the frames need to put any block in several places, to not have any deformation. That is all, good luck.