Skip to main content

postgis

```
postgis <@>

CREATE EXTENSION postgis;

CREATE EXTENSION cube;
CREATE EXTENSION earthdistance;
```

## docker image

``pull postgis/postgis``

param key

```
POSTGRES_PASSWORD
POSTGRES_USER
```

## centos

```
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
```

## install pgsql

```
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
```

```
sudo dnf module enable postgresql:16
sudo dnf install postgresql-server
sudo systemctl start postgresql
```

```
sudo postgresql-setup --initdb
sudo systemctl start postgresql
sudo systemctl enable postgresql
sudo systemctl enable postgresql-11
```

```
sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf install dnf-plugins-core
sudo dnf config-manager --set-enabled powertools
```

```
sudo -i -u postgres
psql
```

```
createuser --interactive
sudo -u postgres postgres --interactive

sudo -u postgres createdb sammy

yum install postgis34_16
```

pg hba conf.

vi /var/lib/pgsql/data/pg_hba.conf