Before you install the door you need to perform other works.
At what stage of repair interior doors are installed : Before You Install The Door You Need To Perform Other Works.
Quote from Article entitled At what stage of repair interior doors are installed:
It is necessary to plan the way furniture will be placed to decide on the necessity of removing a doorway or its expansion not to hinder the door opening-closing and that it remains comfortable in the room.
The full version of the article can be found here.