googlepostgresql

Install PostGIS in a PostgreSQL database

PostGIS adds support for geographic objects to the PostgreSQL object-relational database.

NOTE: Depending on the Bitnami stack you have installed, PostgreSQL and PostGIS might already be included. For example, since Bitnami LAPP Stack v5.4.0-1 version, PostGIS is already included in the stack so it is not necessary to install it manually.

Follow these steps to install the PostGIS extension:

  • Install the compilation tools:

          $ sudo apt-get update
          $ sudo apt-get install build-essential libtool autoconf unzip wget
    
  • Download and install the dependencies:

      $ wget http://download.osgeo.org/geos/geos-3.3.2.tar.bz2
      $ bunzip2 geos-3.3.2.tar.bz2
      $ tar -xvf geos-3.3.2.tar
      $ cd geos-3.3.2
      $ ./configure
      $ make
      $ sudo make install
    
      $ wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz
      $ tar -xzvf proj-4.8.0.tar.gz
      $ cd proj-4.8.0
      $ ./configure
      $ make
      $ sudo make install
    
  • Download and install PostGIS.

      $ wget http://postgis.refractions.net/download/postgis-1.5.3.tar.gz
      $ tar -xzvf postgis-1.5.3.tar.gz
      $ cd postgis-1.5.3
      $ ./configure
      $ make
      $ sudo make install
    
  • Verify that the postgis database has been successfully created.

Learn more about configuring PostgreSQL with PostGIS.

Last modification May 10, 2022