ubuntu18.04安装postgresql9.5/postgresql9.6版本

Ubuntu 18.04 (bionic)

sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update

sudo apt-get install postgresql-9.6
或
sudo apt-get install postgresql-9.5

找到一个教程,强烈推荐:https://www.jianshu.com/p/35443c41ca56

1, 添加库:

sudo add-apt-repository “deb https://apt.postgresql.org/pub/repos/apt/
trusty-pgdg main”

2, 安装

sudo apt-get update

sudo apt-get install postgresql-9.6

sudo apt-get install postgresql-9.6-postgis-2.4

sudo apt-get install postgresql-9.6-pgroutintg

3, 修改密码

sudo passwd postgres

Enter new UNIX password:****

Retype new UNIX password:****

passwd: password updated successfully

4, 启动服务

sudo service postgresql start

5, 切换到默认用户postgres

su postgres

Password:****

作者:定风波手记 链接:https://www.jianshu.com/p/35443c41ca56 来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

你可能感兴趣的:(区块链浏览器)