Changes between Version 23 and Version 24 of UsersWikiPostGIS21UbuntuPGSQL93Apt


Ignore:
Timestamp:
Jan 14, 2016, 12:16:19 PM (8 years ago)
Author:
mapbaker
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiPostGIS21UbuntuPGSQL93Apt

    v23 v24  
    11The [http://wiki.postgresql.org/wiki/Apt PostgreSQL Apt Repository] now hosts installs of PostGIS, in addition to Postgresql and PGAdmin3.
    22
    3 The following describes how to install Postgresql 9.4, PostGIS 2.1, PGAdmin 1.20 and shp2pgsql-gui on Ubuntu versions 12.04 and 14.04.1. It has also been tested and works on Linux Mint, Lubuntu, and Xubuntu.
     3The following describes how to install Postgresql 9.4, PostGIS 2.1, PGAdmin on Ubuntu versions 12.04 and 14.04.1. It has also been tested and works on Linux Mint, Lubuntu, and Xubuntu.
    44
    55Run these in terminal:
     
    4040
    4141== Install ==
    42 The following will install postgresql 9.4, PostGIS, PGAdmin3, and additional supplied modules including '''adminpack'''
     42The following will install postgresql 9.4, PostGIS, PGAdmin3, and additional supplied modules including the '''adminpack''' extension:
    4343
    4444If you are running 14.04 (Trusty, Vivid) -- you need to do this
    4545
    4646{{{
    47 sudo apt-get install postgresql-9.4-postgis-2.1 pgadmin3 postgresql-contrib
     47sudo apt-get install postgresql-9.4-postgis-2.1 pgadmin3 postgresql-contrib-9.4
    4848}}}
    4949
     
    6666== Enable Adminpack ==
    6767
    68 While in terminal, log in to psql as postgres user:
     68While in terminal, log in to the psql console as postgres user:
    6969
    7070{{{
     
    7676}}}
    7777
    78 Find out where core files are located.
    79 You may need to edit to pg_hba.conf and/or pg_ident.conf, postgresql.conf to allow external access - for example if you need external access, may add a line
    80 like this to allow all with md5 password encrypt authentication (right after the local rules)
     78You can also enable the PostGIS extension here (or with the GUI as described below):
     79
     80{{{
     81CREATE EXTENSION postgis;
     82}}}
     83
     84Exit the psql console:
     85
     86{{{
     87\q
     88}}}
     89
     90
     91== Open Access to Clients ==
     92
     93You may need to edit to pg_hba.conf and/or pg_ident.conf, postgresql.conf to allow external access
     94
     95{{{
     96sudo nano /etc/postgresql/9.4/main/pg_hba.conf
     97}}}
     98
     99If you need external access, scroll to the bottom of the pg_hba.conf file and add a line like this (which willa llow all clients with md5 password encrypt authentication (right after the local rules):
    81100
    82101{{{
     
    84103}}}
    85104
     105Click CTRL-X to save your changes, Y to write them to the file, and enter to exit.
     106
    86107You'll also want to edit the postgresql.conf file and change listen_addresses line to a specific ip of the server or '*' to listen on all ips.
     108
    87109If you change ip or port, you need to do a service restart.
    88110
    89 
    90111{{{
    91112service postgresql restart
    92113}}}
    93114
    94 after (can also do from postgres psql console with below - only for changes that don't require retart)
     115Note: you can also do from postgres psql console with below - only for changes that don't require retart)
    95116
    96117{{{
     
    99120
    100121
    101 
     122== Optional: check location of configuration files: ==
     123
     124From the psql console(see above):
    102125 
    103126{{{
     
    119142}}}
    120143
    121 Quit psql:
    122 
    123 {{{
    124 \q
    125 }}}
     144
    126145
    127146== Create new PGSQL user ==