Introduction
In order to build postGIS you need some artifacts from the postgresQL development packagedo minimal changes to standard postgresql deploy (like install postGIS) you must be sure you have control of where you get your packages. This is not as straight forward as it should be. I encourage you to take a few minutes to read this through. First, your "disto repository" is not likely to be up to date with respect to postgresql packages. In other words, if you blindly type "yum install postgresql-devel", you may have trouble getting everything installed properly. I've seen errors regarding missing libraries and the like. To avoid the fuss, when you are installing postgresql packages, use the postgresql repositories instead of your ditsro repsository.
Here is how you do that. You should read this from top to bottom.
- http://yum.pgsqlrpms.org/howtoyum.php
Also read this; you can safley skip sections on this page.
...
And this is good too:
Did you do your reading?
Errors
...