3. Installation

To explore the PostgreSQL/PostGIS database, and learn about writing spatial queries in SQL, we will need some software, either installed locally or available remotely on the cloud.

  • There are instructions below on how to access PostgreSQL for installation on Windows or MacOS. PostgreSQL for Windows and MacOS either include PostGIS or have an easy way to add it on.

  • There are instructions below on how to install PgAdmin. PgAdmin is a graphical database explorer and SQL editor which provides a „user facing“ interface to the database engine that does all the work.

For always up-to-date directions on installing PostgreSQL, go to the PostgreSQL download page and select the operating system you are using.

3.1. PostgreSQL für Microsoft Windows

Installation unter Windows:

  1. Gehen Sie zur`Windows PostgreSQL Download Seite <https://www.enterprisedb.com/downloads/postgres-postgresql-downloads>`_.

  2. Wählen Sie die aktuelle PostgreSQL Version und speichern Sie das Installationspaket lokal.

  3. Starten Sie das Installationsprogramm und akzeptieren Sie dabei die Standardeinstellungen.

  4. Suchen Sie nach dem Programm „StackBuilder“ starten Sie dieses. Der „StackBuilder“ wurde bei der Installation von PostgreSQL installiert.

  5. Gehen Sie in den Bereich „Spatial Extensions“ und wählen Sie die aktuellste „PostGIS ..Bundle“ Option.

    _images/install_windows_01.png
  6. Akzeptieren Sie die Standardwerte und starten die Installation.

3.2. PostgreSQL for Apple MacOS

For a MacOS install:

  1. Go to the Postgres.app site, and download the latest release.

  2. Open the disk image, and drag the Postgres icon into the Applications folder.

    _images/install_macos_01.png
  3. In the Applications folder, double-click the Postgres icon to start the server.

  4. Click the Initialize button to create a new blank database instance.

    _images/install_macos_02.png
  5. In the Applications folder, go to the Utilities folder and open Terminal.

  6. Add the command-line utilities to your PATH for convenience.

sudo mkdir -p /etc/paths.d
echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp

3.3. PgAdmin for Windows and MacOS

PgAdmin is available for multiple platforms, at https://www.pgadmin.org/download/.

  1. Download and install the latest version for your platform.

  2. Start PgAdmin!

    _images/install_pgadmin_01.png