Ubuntu 下 Postgresql 安装

2021-03-25  本文已影响0人  claylee

系统环境 :
Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-96-generic x86_64)

安装步骤

为本地apt仓库建立postgresql映射

假如不更新source文件,apt报错:"Failed to fetch ...Postgresql.....deb "

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'

下载apt签名文件:

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

更新 apt-get的文件列表:

sudo apt-get update

执行安装.

上一篇 下一篇

猜你喜欢

热点阅读