Difference between revisions of "PostGIS & ArcSDE (linux)"
From phurvitz
Phil Hurvitz (talk | contribs) (New page: __FORCETOC__ =Installing SDE & PostGIS on a linux machine= ==OS Config== * RedHat (Linux gist 2.6.18-128.1.1.el5xen #1 SMP Mon Jan 26 14:34:58 EST 2009 i686 i686 i386 GNU/Linux) *: Red Hat...) |
Phil Hurvitz (talk | contribs) (→PostGIS stuff) |
||
Line 72: | Line 72: | ||
==PostGIS stuff== | ==PostGIS stuff== | ||
+ | |||
+ | copy <tt> /usr/local/lib/libgeos-3.1.0.so</tt> to <tt>/usr/local/pgsql/lib/libgeos-3.1.0.so</tt> | ||
===Installing PostGIS basics to the template database=== | ===Installing PostGIS basics to the template database=== | ||
Assures that new databases will be populated with PostGIS functionality | Assures that new databases will be populated with PostGIS functionality | ||
Line 92: | Line 94: | ||
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE public.geometry_columns TO sde; | GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE public.geometry_columns TO sde; | ||
</pre> | </pre> | ||
− | |||
==ArcSDE stuff== | ==ArcSDE stuff== |
Revision as of 00:50, 2 April 2009
Contents
Installing SDE & PostGIS on a linux machine
OS Config
- RedHat (Linux gist 2.6.18-128.1.1.el5xen #1 SMP Mon Jan 26 14:34:58 EST 2009 i686 i686 i386 GNU/Linux)
- Red Hat Enterprise Linux Server release 5.3 (Tikanga)
- Running on a VMWare machine on top of WinXP
OS users
- postgres
- .bashrc contents:
PGDATA=/usr/local/pgsql/data export PGDATA PATH=$PATH:/usr/bin:/usr/local/bin export PATH LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/local/pgsql/lib export LD_LIBRARY_PATH
- sde
- .bashrc contents:
SDEHOME=/usr/local/sde/sdeexe93 export SDEHOME PATH=$PATH:$SDEHOME/bin export PATH LD_LIBRARY_PATH=/usr/local/sde/sdeexe93/lib export LD_LIBRARY_PATH
PostgreSQL data dir
mkdir /usr/local/pgsql/data chown -R /usr/local/pgsql/data
Software
- PostgreSQL 8.3.7
- compiled with configure --with-perl --with-python
- Geos 3.1.0
- compiled with configure --enable-python --enable-ruby (not that I'll actually use ruby!)
- Proj.4 4.6.1
- standard build
- PostGIS 1.3.5
- compiled with configure --with-geos --with-pgsql --with-proj --prefix=/usr/local/pgsql
- ArcSDE 9.3
PostgreSQL stuff
pg_hba.conf contents
# "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust host all all 128.95.140.165/32 password host all all 128.95.140.149/32 password host all all 128.95.140.144/32 password host all all 140.142.198.178/32 password host all all 140.142.198.123/32 trust host all all 192.168.0.0/24 md5 # IPv6 local connections: #host all all ::1/128 trust
users
- createuser sde
- createuser phurvitz
PostGIS stuff
copy /usr/local/lib/libgeos-3.1.0.so to /usr/local/pgsql/lib/libgeos-3.1.0.so
Installing PostGIS basics to the template database
Assures that new databases will be populated with PostGIS functionality
- createlang plpgsql template1
- psql -d template1 -f /usr/local/src/postgis-1.3.5/lwpostgis.sql
- psql -d template1 -f /usr/local/src/postgis-1.3.5/spatial_ref_sys.sql
ArcSDE schema
While logged in as postgres
psql CREATE SCHEMA sde AUTHORIZATION sde; GRANT ALL ON SCHEMA sde to sde; GRANT USAGE ON SCHEMA sde TO public;
Created a new database:
create database msb owner phurvitz; GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE public.geometry_columns TO sde;
ArcSDE stuff
Authorization key
Get an authorization key from Luke, save as /usr/local/sde/ArcGIS_Server_v93.ecp
sdesetup for a database
- as sde user:
- sdesetup -o install -d POSTGRESQL -D msb
- sdesetup -o update_key -d POSTGRESQL -l /usr/local/sde/ArcGIS_Server_v93.ecp -D msb
NOTE: do not perform the sdesetup routine on the template1 database!
Start the sde service
sdemon -o start -i esri_sde