ubuntu16.04搭建geodjango+postgresql+postgis的WebGIS框架(二))安装postgresql和postgis

卸载老版本
sudo dpkg --purge postgis postgresql-9.3-postgis
1.安装postgresql
sudo apt-cache search postgresql //查找最新的postgresql包 sudo apt-get install postgresql包名 //选择包名进行安装
2.安装postgis

 sudo apt-cache search postgis

 sudo apt-get install postgis

 3.修改密码

 sudo  -u postgres psql

 alter user postgres with password 'postgres';

 /q退出

 4.安装图形管理工具pgadmin

 sudo apt install pgadmin3

 使用图形管理工具创建空间数据库,添加相应的扩展就可以了(postgis必须加入)。

原文地址:https://www.cnblogs.com/icat-510/p/8966029.html