Ubuntu16.04 builds the WebGIS framework of geodjango+postgresql+postgis (2)) Install postgresql and postgis

Uninstall the old version 
sudo dpkg --purge postgis postgresql-9.3-postgis
1. Install postgresql
$sudo apt-cache search postgresql //find the latest postgresql package
$sudo apt-get install postgresql package name//Select the package name to install 

2. Install postgis

 $sudo apt-cache search postgis

 $sudo apt-get install postgis

   3. Change the password

   sudo  -u postgres psql

   alter user postgres with password 'postgres';

   /q quit

   4. Install the graphical management tool pgadmin

    sudo apt install pgadmin3

   Use the graphical management tool to create a spatial database, and add the corresponding extension (postgis must be added).

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325019979&siteId=291194637