Also view the bike from the rear after attaching the rear derailleur, and check whether the frame's derailleur mount is out of alignment. If it is, you want to get it aligned so your new derailleur doesn't get wrecked (hooked in the spokes when shifting to low gear, for example).
Aligning the derailleur hanger can be done by your LBS the "proper" way, or you can usually do a reasonable job with some careful use of a large adjustable wrench. If the hanger is significantly damaged, thread the bolt from the old derailleur back into the hole before you start aligning the hanger, so the bolt keeps the hole from getting too deformed to install your new derailleur into it.
Disclaimer: you can ruin your frame if it does not have a removable/replaceable derailleur hanger and you're unlucky or uncareful. So if you're not sure on this task, hand it off to the LBS.