Changes between Version 1 and Version 2 of UsersWikiPostGIS21UbuntuPGSQL93Apt


Ignore:
Timestamp:
Dec 9, 2013, 3:04:50 PM (10 years ago)
Author:
mapbaker
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiPostGIS21UbuntuPGSQL93Apt

    v1 v2  
    77Run in terminal:
    88
    9 {{{sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list'}}}
     9{{{
     10sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list'
     11}}}
    1012
    11 {{{wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -}}}
     13{{{
     14wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
     15}}}
    1216
    13 {{{sudo apt-get update}}}
     17{{{
     18sudo apt-get update
     19}}}
    1420
    1521== Install ==
    16 The following will install postgresql 9.3, PostGIS, PGAdmin3, and additional supplied modules including {{{adminpack}}}
     22The following will install postgresql 9.3, PostGIS, PGAdmin3, and additional supplied modules including '''adminpack'''
    1723
    18 {{{sudo apt-get install postgresql-9.3-postgis pgadmin3 postgresql-contrib}}}
     24{{{
     25sudo apt-get install Postgresql-9.3-postgis pgadmin3 postgresql-contrib
     26}}}
    1927
    2028== Enable Adminpack ==
     
    2230While in terminal, log in to psql as postgres user:
    2331
    24 {{{sudo -u postgres psql}}}
     32{{{
     33sudo -u postgres psql
     34}}}
    2535
    26 {{{CREATE EXTENSION adminpack;}}}
     36{{{
     37CREATE EXTENSION adminpack;
     38}}}
    2739
    2840Quit psql:
    2941
    30 {{{\q}}}
     42{{{
     43\q
     44}}}
    3145
    3246== Create new PGSQL user ==
     
    3650While in terminal, run:
    3751
    38 {{{sudo su - postgres}}}
     52{{{
     53sudo su - postgres
     54}}}
    3955
    40 {{{createuser -d -E -i -l -P -r -s yourUserName}}} (be sure to change the username to your desired username)
     56{{{
     57createuser -d -E -i -l -P -r -s yourUserName
     58}}}
     59
     60(be sure to change the username to your desired username)
    4161
    4262Enter your new password when prompted
    4363
    44 Log out as {{{postgres}}} user:
     64Log out as {{{
     65postgres
     66}}} user:
    4567
    46 {{{exit}}}
     68{{{
     69exit
     70}}}
    4771
    4872Exit terminal:
    4973
    50 {{{exit}}}
     74{{{
     75exit
     76}}}
    5177
    5278== Use PGAdmin to log into database server ==
     
    7399Right-click the extensions node, and click {{{new extension}}}
    74100
    75 Enable the {{{postgis}}} extension, as well as {{{postgis_topology}}}
     101Enable the '''postgis''' extension, as well as '''postgis_topology'''
    76102
    77 == Test shp2pgsql-gui ==
     103== Import SHP files using shp2pgsql-gui ==
    78104
    79 Another handy piece of software to use is the {{{shp2pgsql-gui}}} tool. This will allow you to quickly connect to your new PostGIS database and import a Shapefile.
     105Another handy piece of software {{{shp2pgsql-gui}}} tool. This will allow you to quickly connect to your new PostGIS database and import a Shapefile.
    80106
    81107Open terminal, and type:
    82108
    83 {{{shp2pgsql-gui}}}
     109{{{
     110shp2pgsql-gui
     111}}}
    84112
    85113Follow the on-screen prompts to load your data.