pursued. A tenant actually in occupation, and a subtenant if there is one, are necessary parties defendant. (§ 1164.) A summons must be issued based on the complaint (§ 1166), and served and returned in the same manner as in other civil actions, except that the time to answer is shorter. (§ 1167.) After he is served with the summons and complaint, defendant may appear by answer or demurrer (§ 1170), and he has the right to a trial of the action. (§§ 1170.5; 1171.) A default may be taken only after a defendant served with summons does not appear to defend. (§ 1169.) As in other civil actions, the landlord-plaintiff can only obtain a default judgment, here a judgment for possession, after defendant has been served with process and fails to respond. (§§ 1177, 585.)