Building and Installing PostGIS from Source



You need to already have PostgreSQL, its dev package, and it libraries installed. On Fedora-based distributions, it looks like this:

 Eat Your Wheaties

  1. Setup local time zone.
  2. Update installed packages.
  3. Reboot.

Install Essential Prerequisite Packages


 Build PostGIS Prerequisites

For each of the following  libraries, we go through these steps:

  1. Configure, passing in --prefix=/usr  and --libdir=/usr/lib64 .
  2. Compile using make .
  3. Install using make .

Working Directory






This one takes a while. On a “medium” sized server, running 4 parallel build processes, it takes about 10 minutes.






This one takes a full 20 minutes to build.



Now that we have all the dependencies installed, building and installing PostGIS from source is relatively quick.




Leave A Reply