CodingYang

vuePress-theme-reco Rackar    2018 - 2024
CodingYang CodingYang

Choose mode

  • dark
  • auto
  • light
首页
类别
  • 技术
  • 个人
  • 思考
  • 儿童
标签
时间线
联系
  • 关于
  • RSS订阅 (opens new window)
  • GitHub (opens new window)
  • 简书 (opens new window)
  • CSDN (opens new window)
  • WeChat (opens new window)
GitHub (opens new window)
author-avatar

Rackar

67

文章

44

标签

首页
类别
  • 技术
  • 个人
  • 思考
  • 儿童
标签
时间线
联系
  • 关于
  • RSS订阅 (opens new window)
  • GitHub (opens new window)
  • 简书 (opens new window)
  • CSDN (opens new window)
  • WeChat (opens new window)
GitHub (opens new window)
  • 安装

    • 安装

    vuePress-theme-reco Rackar    2018 - 2024

    安装


    Rackar

    # 安装

    mkdir /postgis
    
    sudo docker run --name "postgis" -v /postgis:/postgis -p 5433:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASS='123456' -e POSTGRES_MULTIPLE_EXTENSIONS=postgis -e ALLOW_IP_RANGE=0.0.0.0/0 --restart always -d -t kartoza/postgis
    
    sudo docker exec -it postgis bash
    
    cd /etc/postgresql/12/main/
    
    
    1
    2
    3
    4
    5
    6
    7
    8

    In pg_hba.conf you will have to make a small change to the settings under Database administrative login by Unix domain socket from peer to trust. On lines 84 & 85, it should look like this:

    # Database administrative login by Unix domain socket
    local   all             postgres                                trust
    
    # IPv4 local connections:
    host    all             all             127.0.0.1/32            md5
    host    all             all             0.0.0.0/0              md5
    
    1
    2
    3
    4
    5
    6

    exit

    sudo docker restart postgis
    sudo docker exec -it postgis psql -U postgres
    
    1
    2
    netstat -nlp | grep 5432 ##查看是否成功
    
    1

    重启命令 service postgresql restart

    手动修改默认密码 ALTER USER postgres WITH PASSWORD '123456';

    参与编辑此文章 (opens new window)
    更新于: 4/2/2020, 9:47:04 AM