GIS Tutorial
  • Home
  • About
  • Contact

Popular Posts

How to open Mapinfo TAB file on QGIS
QGIS,

How to open Mapinfo TAB file on QGIS

by adminJanuary 1, 20181 comment
How to Export Layer to Shapefile on QGIS
QGIS,

How to Export Layer to Shapefile on QGIS

by adminSeptember 21, 2018no comment
How to Create a GeoPackage on QGIS 3.2
QGIS,

How to Create a GeoPackage on QGIS 3.2

by adminJuly 25, 2018no comment
How to convert polyline to polygon on QGIS 3.0
QGIS,

How to convert polyline to polygon on QGIS 3.0

by adminJune 12, 2018no comment

Category List

  • ArcGIS (83)
  • Database (58)
  • Free Spatial Data (2)
  • General (6)
  • Geoserver (2)
  • GIS Software (23)
  • Global Mapper (20)
  • Leapfrog Geo (16)
  • Linux (9)
  • macOS (2)
  • Mapinfo (40)
  • Micromine (32)
  • Oracle (6)
  • Programming (8)
  • QGIS (105)
  • Software Review (2)
  • Surfer (2)
  • Uncategorized (6)

Follow Us

Instagram

Instagram has returned invalid data.
GIS Tutorial
  • Home
  • About
  • Contact
Database, GIS Software,

How to Install PostGIS on Debian 12

by adminOctober 10, 2023no comment
0
Shares
Share on FacebookShare on Twitter

In my previous article, we learned about how to install PostgreSQL on Debian 12. Now, as a GIS, I want to expand my database server capabilities. PostGIS allows us to store the GIS file formats directly in the PostgreSQL database. If you are a QGIS or ArcGIS Pro user, you can work with PostGIS seamlessly. Both software have good support for PostGIS. In this article, I am using the latest Debian 12.2.0. You can download a copy of Debian 12.2 from this link.

Steps to Install PostGIS on Debian 12

I can summarize the general steps to get the PostGIS up and running on our system below:

  1. Install PostgreSQL Server. You can use Linux, Windows, as well as Mac to install PostgreSQL
  2. Create a New Database
  3. Install PostGIS extension
  4. Enable PostGIS extension on the database. PostGIS must be enabled on the database.
  5. Connect GIS Software to PostGIS

Step 1. Install PostgreSQL Server

We can install PostgreSQL Server on almost any operating system. We can install it on Windows, Mac, and Linux. If you are running Debian 12, you can follow this tutorial to install PostgreSQL Server. Make sure you install it correctly and check the status with this command in Debian.

sudo systemctl status postgresql

At this point, we have the PostgreSQL server up and running. Let us continue to the next step.

Step 2. Install PostGIS

From the Terminal, execute this command to install PostGIS package in Debian 12.

apt install postgis

Now we need to enable the postgis extension to our database. In this example, I will enable the extension on my database called gis_database. Follow the steps below to enable postgis extension on a database.

So now our database has the postgis extension. Let’s try to put some spatial data into it. I will use QGIS program to export my spatial data to the database.

Open QGIS and go to Layer | Data Source Manager. Add our PostgreSQL database information.

To import a vector layer to the PostgreSQL server, go to Database | DB Manager. Choose the newly added PostgreSQL server and then click Import Layer/File. Specify the vector layer and click OK.

Now we have successfully imported a vector layer to our PostgreSQL database.

postgispostgresql
Previous

How to Fix ERROR Permission Denied for Schema Public in PostgreSQL

October 10, 2023
Next

How to Install Docker on Debian 12

October 12, 2023

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trending

  • How to Install Microsoft SQL Server Driver for Tableau in Apple Silicon Mac

    How to Install Microsoft SQL Server Driver for Tableau in Apple Silicon Mac

    2 weeks ago
  • Step by Step Installing Oracle Spatial Studio on Windows Server 2022

    Step by Step Installing Oracle Spatial Studio on Windows Server 2022

    2 months ago
  • Install GeoServer on Windows 11

    Install GeoServer on Windows 11

    2 months ago
  • How Enable GeoRaster Support on Oracle Database Schema

    How Enable GeoRaster Support on Oracle Database Schema

    2 months ago

Ads




Ads




Pages