If your pH is from 5 to 7, you may raise it by passing the water through a sacrificial media. By sacrificing calcium carbonate into the water, the corrosively will be reduced. If the pH is below 5, you will need to feed chemicals into the water.
If the corrosively is caused by excess oxygen, the hot water will be much more corrosive than the cold. Treatment is by feeding polyphosphate or silicates to coat and protect the plumbing, or to aerate the water to release the excess oxygen.