ubuntu 18 虚拟机安装(4)安装 postgres sql 数据库

ubuntu 18 虚拟机安装(4)安装 postgres sql 数据库

如何在Ubuntu 20.04上安装和使用TimescaleDB
https://devpress.youkuaiyun.com/ubuntu/62ecdfba19c509286f417923.html

如何查看PostgreSQL的版本
https://blog.youkuaiyun.com/lee_vincent1/article/details/138731465
postgres 查看全部数据库
https://blog.youkuaiyun.com/xie__jin__cheng/article/details/138653002
Ubuntu18.04安装Postgresql与配置
https://blog.youkuaiyun.com/b285795298/article/details/130759531

https://www.postgresql.org/download/linux/ubuntu/

https://www.cnblogs.com/xu360/articles/16860260.html
How To Install and Use PostgreSQL on Ubuntu 18.04
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04

postgres新增用户、创建新库
https://blog.youkuaiyun.com/qq_34322136/article/details/135624871
https://www.jb51.net/article/204207.htm

2.设置数据库时间和时区
(1). 通过命令
PRC为东八区 北京时间 UTC+8
Asia/Shanghai为东八区 上海时间 GMT+8
但是通过这种方式设置时区是session级别的,退出会话会失效

https://blog.youkuaiyun.com/qq_45658339/article/details/124431612

查看所有用户

cat /etc/passwd

查看所有用户个数

cat /etc/passwd | wc -l
31

sudo apt-get update
sudo apt-get install postgresql -y

The following additional packages will be installed:
  libpq5 libsensors4 postgresql-10 postgresql-client-10 postgresql-client-common postgresql-common ssl-cert sysstat
Suggested packages:
  lm-sensors postgresql-doc locales-all postgresql-doc-10 libjson-perl openssl-blacklist isag
The following NEW packages will be installed:
  libpq5 libsensors4 postgresql postgresql-10 postgresql-client-10 postgresql-client-common postgresql-common ssl-cert sysstat
0 upgraded, 9 newly installed, 0 to remove and 45 not upgraded.
Adding user postgres to group ssl-cert
Creating config file /etc/postgresql-common/createcluster.conf with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /lib/systemd/system/postgresql.service.
Setting up libsensors4:amd64 (1:3.4.0-4ubuntu0.1) ..
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值