Here in San Diego, you can use flexible pipe for hot water, cold water and the gas line. They require a gas turn-off valve near the heater.
An easy DIY project if you have the strength to handle the old and new heater.
Get a permit and get the heater inspected to make sure everything is OK . Nowadays, most prospective buyers will also want to see the permit. Buyers also want to see a permit for a furnace installation or anything else that legally requires a permit, such as a room addition. A permit does not prevent you from doing the work yourself, except installing a gas furnace and A/C which require a licensed contractor (environmental reasons).