Created
June 9, 2015 20:01
-
-
Save damienvancouver/1a44844bc170a783162c to your computer and use it in GitHub Desktop.
PostGIS 1 / PostGRES 8 installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su postgres | |
createuser -l -W fortmckay | |
# Shall the new role be a superuser? (y/n) n | |
# Shall the new role be allowed to create databases? (y/n) n | |
# Shall the new role be allowed to create more new roles? (y/n) n | |
# Password: <type the user password> | |
createdb fortmckay --o fortmckay | |
createlang plpgsql -d fortmckay | |
psql fortmckay -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql | |
psql fortmckay -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql | |
Then set some stuff in sql with: | |
psql fortmckay | |
# grant privilege on standard ogc tables to user | |
grant all on geometry_columns to fortmckay; | |
grant select on spatial_ref_sys to fortmckay; | |
alter role fortmckay with password '<password>'; # for some reason we have to set this again in psql before it works | |
Finally, test that you can connect with: | |
psql -h 127.0.0.1 -U fortmckay fortmckay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment