Changes between Version 23 and Version 24 of UsersWikiPostGIS21UbuntuPGSQL93Apt
- Timestamp:
- 01/14/16 12:16:19 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersWikiPostGIS21UbuntuPGSQL93Apt
v23 v24 1 1 The [http://wiki.postgresql.org/wiki/Apt PostgreSQL Apt Repository] now hosts installs of PostGIS, in addition to Postgresql and PGAdmin3. 2 2 3 The following describes how to install Postgresql 9.4, PostGIS 2.1, PGAdmin 1.20 and shp2pgsql-guion Ubuntu versions 12.04 and 14.04.1. It has also been tested and works on Linux Mint, Lubuntu, and Xubuntu.3 The 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. 4 4 5 5 Run these in terminal: … … 40 40 41 41 == Install == 42 The following will install postgresql 9.4, PostGIS, PGAdmin3, and additional supplied modules including '''adminpack'''42 The following will install postgresql 9.4, PostGIS, PGAdmin3, and additional supplied modules including the '''adminpack''' extension: 43 43 44 44 If you are running 14.04 (Trusty, Vivid) -- you need to do this 45 45 46 46 {{{ 47 sudo apt-get install postgresql-9.4-postgis-2.1 pgadmin3 postgresql-contrib 47 sudo apt-get install postgresql-9.4-postgis-2.1 pgadmin3 postgresql-contrib-9.4 48 48 }}} 49 49 … … 66 66 == Enable Adminpack == 67 67 68 While in terminal, log in to psqlas postgres user:68 While in terminal, log in to the psql console as postgres user: 69 69 70 70 {{{ … … 76 76 }}} 77 77 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) 78 You can also enable the PostGIS extension here (or with the GUI as described below): 79 80 {{{ 81 CREATE EXTENSION postgis; 82 }}} 83 84 Exit the psql console: 85 86 {{{ 87 \q 88 }}} 89 90 91 == Open Access to Clients == 92 93 You may need to edit to pg_hba.conf and/or pg_ident.conf, postgresql.conf to allow external access 94 95 {{{ 96 sudo nano /etc/postgresql/9.4/main/pg_hba.conf 97 }}} 98 99 If 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): 81 100 82 101 {{{ … … 84 103 }}} 85 104 105 Click CTRL-X to save your changes, Y to write them to the file, and enter to exit. 106 86 107 You'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 87 109 If you change ip or port, you need to do a service restart. 88 110 89 90 111 {{{ 91 112 service postgresql restart 92 113 }}} 93 114 94 after (can also do from postgres psql console with below - only for changes that don't require retart)115 Note: you can also do from postgres psql console with below - only for changes that don't require retart) 95 116 96 117 {{{ … … 99 120 100 121 101 122 == Optional: check location of configuration files: == 123 124 From the psql console(see above): 102 125 103 126 {{{ … … 119 142 }}} 120 143 121 Quit psql: 122 123 {{{ 124 \q 125 }}} 144 126 145 127 146 == Create new PGSQL user ==