install and use postgis in debian/ubuntu

因为postgis已经进入debian的库了,就把原来用source安钻的postgresql和postgis都删除掉,然后从库中安装。
aptitude install postgresql-8.1-postgis
然后再创建数据库,并作相应的初始化工作:
createlang plpgsql yourdatabase
psql -f `locate lwpostgis.sql` -d yourdatabase
psql -f `locate spatial_ref_sys.sql` -d yourdatabase

最后再添加一个超级用户:
create user xxx with password ‘passwd’ createuser createdb

This entry was posted in PostGIS and tagged , , . Bookmark the permalink.

One Response to install and use postgis in debian/ubuntu

  1. wlx [微博 ] says:

    也可以这样添加帐号:
    sudo su postgres
    createuser -P
    然后创建一个和当前系统帐号相同的帐号

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Please copy the string Otd6qX to the field below:

以新浪微博帐号登录