zhyiwww
用平实的笔,记录编程路上的点点滴滴………
posts - 536,comments - 394,trackbacks - 0

把下面的代码存为 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.blogjava.net/zhyiwww   
|----------------------------------------------------------------------------------------|
posted on 2009-06-26 16:55 zhyiwww 阅读(1987) 评论(0)  编辑  收藏 所属分类: databaselinuxgisPostgres

只有注册用户登录后才能发表评论。


网站导航: