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