install postgis(2.0) on ubuntu(12.04)

1. 安装postgis

sudo apt-add-repository ppa:sharpie/for-science  # To get GEOS 3.3.2 
sudo apt-add-repository ppa:sharpie/postgis-nightly
sudo apt-get update
sudo apt-get install postgresql-9.1-postgis

2. 创建数据库模版  

    sudo su postgres
    createdb postgis_template
    psql -d postgis_template -f /usr/share/postgresql/9.1/contrib/postgis-2.0/lwpostgis.sql
    psql -d postgis_template -f /usr/share/postgresql/9.1/contrib/postgis-2.0/spatial_ref_sys.sql

3. 修改用户密码

psql  
ALTER USER postgres WITH PASSWORD '123456';

参考资料

 

1.http://my.oschina.net/kiwivip/blog/106861

2.http://linfiniti.com/2012/05/installing-postgis-2-0-on-ubuntu/

3.http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS20Ubuntu1204

posted on 2013-09-22 09:33  _Deron_  阅读(315)  评论(0编辑  收藏  举报

导航