Changes between Initial Version and Version 1 of UsersWikiPostGIS2_FreeBSD_install


Ignore:
Timestamp:
01/06/13 17:32:42 (12 years ago)
Author:
psprague
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiPostGIS2_FreeBSD_install

    v1 v1  
     1Guide to compile and install PostGIS 2 on FreeBSD with PostgreSQL 9.2
     2
     3[work in progress.]
     4
     5Currently there is no PostGIS2 port, so you will have to compile directly from source.
     6
     7Follow generic guide here: http://postgis.net/docs/manual-2.0/postgis_installation.html
     8
     9FreeBSD specific guide:
     10
     11Install/upgrade dependencies:
     12
     13Check PostgreSQL installed
     14
     15  pkg_info | grep sql
     16
     17Upgrade to PostgreSQL 9.2 [not needed as long as you have >9.0, but as this is a development server, I moved to 9.2]
     18
     19  pg_dumpall > dumpfilename.sql [have to be proper user]
     20
     21  /usr/local/etc/rc.d/postgresql stop
     22
     23  cd /usr/local/
     24
     25  mv pgsql pgsql_dump_`date +%Y%m%d%H%M`
     26
     27  pkg_delete postgresql91-contrib
     28
     29  pkg_delete postgresql91-client
     30
     31  pkg_delete postgresql91-server
     32
     33  cd /usr/ports/databases/postgresql92-server
     34
     35  make install clean [config as needed]
     36
     37  repeat for contrib
     38
     39[see for better instructions on upgrading: http://www.b1c1l1.com/blog/2011/01/01/upgrading-postgresql-on-freebsd/]
     40
     41Upgrade PGAdmin3 to 1.16 to work with PostgreSQL 9.2
     42
     43  Throws an error when port is compiled.  I took the easy way and installed the newest PBI
     44
     45Use 'pkg_info |grep gdal' to check for gdal, proj4, and other dependencies
     46
     47Install/upgrade as required from ports
     48
     49cd /usr/ports/graphics/gdal
     50
     51make install clean
     52.......
     53
     54Download:
     55
     56wget http://www.postgis.org/download/postgis-2.0.2.tar.gz
     57
     58tar -xvzf postgis-2.0.2.tar.gz
     59
     60cd postgis-2.0.2
     61
     62
     63Configure:
     64
     65First got iconv.h configuration errors.  Tried to link to iconv work directories - no go. Use ./configure --with-... as in provided link.
     66https://gist.github.com/4015581
     67
     68Build
     69
     70$ make install
     71
     72Go to PGAdmin3 -> database you want the spatial extensions on -> extensions -> add new extension -> choose postgis & postgis topology
     73
     74
     75Remember to have fun!
     76
     77Peter