把下面的代碼存為 install_postgis.sh
然后執行。
必須在postgres用戶下執行。
######################################################################
## install postgis on postgresql 8.3
##
## NOTICE:
##? su to postgres user,then execute sh install_postgis.sh
##
######################################################################
dropdb postgis_template
createdb -T template1 postgis_template
createlang -d postgis_template plpgsql
cd /usr/share/postgresql-8.3-postgis
psql? -d postgis_template -f lwpostgis.sql
psql? -d postgis_template -f spatial_ref_sys.sql
?
psql? -d postgis_template -c "GRANT ALL ON geometry_columns TO PUBLIC"
psql? -d postgis_template -c "GRANT ALL ON spatial_ref_sys TO PUBLIC"
psql? -d postgis_template -c "VACUUM FREEZE"
psql? -l
|----------------------------------------------------------------------------------------|
版權聲明 版權所有 @zhyiwww
引用請注明來源 http://www.tkk7.com/zhyiwww
|----------------------------------------------------------------------------------------|
posted on 2009-06-26 16:55
zhyiwww 閱讀(1996)
評論(0) 編輯 收藏 所屬分類:
database 、
linux 、
gis 、
Postgres