Skip to content

Instantly share code, notes, and snippets.

@defaye
Created May 28, 2020 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save defaye/fb56b694f6c02b339546a254f4921640 to your computer and use it in GitHub Desktop.
Save defaye/fb56b694f6c02b339546a254f4921640 to your computer and use it in GitHub Desktop.
Install PostGIS
sudo apt update && sudo apt install -y postgis postgresql-10-postgis-2.4
sudo -u postgres createuser postgis_test
sudo -u postgres createdb postgis_db -O postgis_test
sudo -u postgres psql -d postgis_db -c 'CREATE EXTENSION postgis'
sudo -u postgres psql -d postgis_db -c 'SELECT PostGIS_version()'
@defaye
Copy link
Author

defaye commented Jun 2, 2020

To run this command in one line:

curl -s https://gist.github.com/defaye/fb56b694f6c02b339546a254f4921640/raw/41d8674fc734b8ed446d1dc512446a46027dffae/install_postgis.sh | sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment