The obligation to put up mezuzahs is upon the renter, because they need the שמירה while they are living there. Regarding how soon the renter must put up mezuzahs, differs between renting a dira in Eretz Yisroel and in Chutz L’aretz. In Eretz Yisroel one must put up all the mezuzahs right away, whereas in Chutz L’aretz one has 30 days before having to put them up. In either place, one who buys a dira must put up all the mezuzahs right away. (If one bought the house they are renting, they do not need to remove and replace the mezuzahs.)