$sudo apt-get update
$sudo apt-get upgrade
#参数YOUR_UBUNTU_VERSION_HERE为 xenial(16.04)/bionic(18.04)/trusty(14.04)
$sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ YOUR_UBUNTU_VERSION_HERE-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
$sudo apt-get install wget ca-certificates
$wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
$sudo apt-get update
$sudo apt-get upgrade
$sudo apt-get install postgresql-10
$psql #查看版本
$psql -U postgres -d postgres #访问PostgreSQL,安装默认用户名postgres,默认数据库postgres
ubuntu安装postgresql10
猜你喜欢
转载自blog.csdn.net/weixin_42555131/article/details/80888017
今日推荐
周排行