安装postgresql
1.首先查看是否已经安装了旧版本
dpkg -l |grep postgresql
2.添加postgresql源
sudo touch /etc/apt/sources.list.d/pgdb.list
sudo vim /etc/apt/sources.list.d/pgdb.list
3.添加数据到pgdb.list文件中
deb https://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main
4.添加postgresql安装包的密钥
sudo wget --quiet -O - https://postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
5.安装postgresql
sudo apt-get update
sudo apt-get install postgresql-9.4
6.查看安装组件
dpkg -l | grep postgresql
网友评论