day62-postgresql安装教程

安装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
    原文作者:xdxh
    原文地址: https://www.jianshu.com/p/04374589fe47
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞