* note ⇐ ArcGIS Pro 2.5 and Arcmap 10.8 cant connect to Postgres 12
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
RELEASE=$(lsb_release -cs)
echo "deb http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo tee /etc/apt/sources.list.d/pgdg.list
sudo apt update
sudo apt -y install postgresql-11
mkdir /var/lib/postgresql/11/main chown postgres:postgres /var/lib/postgresql/11/main su postgres /usr/lib/postgresql/11/bin/initdb -D /var/lib/postgresql/11/main --locale=cs_CZ.UTF8 -E UTF-8 exit systemctl enable postgresql systemctl start postgresql
CREATE ROLE sde LOGIN PASSWORD '{PASSWORD}' superuser noinherit createdb;
CREATE TABLESPACE sde OWNER sde LOCATION '/var/lib/postgresql/12/main/sde';
CREATE DATABASE company OWNER sde ENCODING 'UTF8' TABLESPACE sde;
GRANT ALL ON DATABASE company TO sde;
\c company
CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
CREATE EXTENSION IF NOT EXISTS postgis_topology;
CREATE SCHEMA sde AUTHORIZATION sde;
GRANT ALL ON SCHEMA sde TO sde;
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE public.geometry_columns TO sde;
GRANT SELECT ON TABLE public.spatial_ref_sys TO sde;
st_geometry.so -> /usr/lib/postgresql/12/lib
Connect to server and select “Enable Geodatabase”
Table sde_dbtune
| DEFAULTS | GEOMETRY_STORAGE | PG_GEOMETRY |