Ubuntu18.04安装postgresql-10

Ubuntu18安装postgresql-10

最近切换Ubuntu作为办公系统,所有软件安装都要重来一遍。

官方文档: https://www.postgresql.org/download/linux/ubuntu/

查看系统版本

~  lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.2 LTS
Release:	18.04
Codename:	bionic

我的系统是 bionic, 其他还有xenial(16), trusty(14).

创建resource源

vim /etc/apt/sources.list.d/pgdg.list 

deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main

导入key

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

可以安装以下软件

name desc
postgresql-client-10 client libraries and client binaries
postgresql-10 core database server
postgresql-contrib-9.x additional supplied modules (part of the postgresql-xx package in version 10 and later)
libpq-dev libraries and headers for C language frontend development
postgresql-server-dev-10 libraries and headers for C language backend development
pgadmin4 pgAdmin 4 graphical administration utility

安装

sudo apt-get install postgresql-10  pgadmin4

安装之后

安装完毕已经启动,可以修改下密码:

sudo su postgres
ALTER USER postgres WITH PASSWORD '新密码'; 

安装完的目录: /var/lib/postgresql/10

然后其他配置类似centos7: https://www.cnblogs.com/woshimrf/p/centos-install-postgresql.html

启动pgadmin

Ubuntu上navicate貌似不好装,使用官方pgadmin4

sudo find / -name pgAdmin4

## 启动
pgAdmin4
posted @   Ryan.Miao  阅读(3051)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2016-07-08 MongoDB-基础-limit-skip-sort
2016-07-08 MongoDB-基础-条件操作符
2016-07-08 mongodb-基础-update-remove
点击右上角即可分享
微信分享提示