标签:you ppa 输入密码 etc led class var deb lan
系统环境: ubuntu16.04
PostgreSQL 版本: 12
注意:TimescaleDB 需要PostgreSQL 11.4+或12.0+。不再支持PostgreSQL 9.6.3+和10.9+,并将在以后的版本中删除。
ubuntu@VM-0-12-ubuntu:~# sudo echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -c -s)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list?
ubuntu@VM-0-12-ubuntu:~# sudo wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -?
ubuntu@VM-0-12-ubuntu:~# sudo apt-get update
ubuntu@VM-0-12-ubuntu:~# sudo add-apt-repository ppa:timescale/timescaledb-ppa?
ubuntu@VM-0-12-ubuntu:~# sudo apt-get update?
ubuntu@VM-0-12-ubuntu:~# sudo apt install timescaledb-postgresql-12
ubuntu@VM-0-12-ubuntu:~# sudo timescaledb-tune --quiet --yes
ubuntu@VM-0-12-ubuntu:~# sudo service postgresql restart
ubuntu@VM-0-12-ubuntu:~$ sudo -u postgres psql postgres
psql (12.2 (Ubuntu 12.2-2.pgdg16.04+1))
Type "help" for help.
postgres=# \password postgres
Enter new password: #输入密码
Enter it again: #确认密码
postgres=# \q #退出
ubuntu@VM-0-12-ubuntu:~# sudo vim /etc/postgresql/12/main/pg_hba.conf
...
# Database administrative login by Unix domain socket
# local all postgres md5
local all postgres peer #peer 方式允许管理员账号通过socket连接,用-h 指定socket目录,(default: "/var/run/postgresql")
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 10.0.0.1/16 md5
host all all 127.0.0.1/32 md5
...
ubuntu@VM-0-12-ubuntu:~# sudo vim /etc/postgresql/12/main/postgresql.conf
...
listen_addresses = ‘*‘ # what IP address(es) to listen on;
...
ubuntu@VM-0-12-ubuntu:~$ psql -h /var/run/postgresql -U postgres -W
Password: #输入密码
psql (12.2 (Ubuntu 12.2-2.pgdg16.04+1))
Type "help" for help.
postgres=# \q
参考: https://docs.timescale.com/latest/getting-started/installation/ubuntu/installation-apt-ubuntu
标签:you ppa 输入密码 etc led class var deb lan
原文地址:https://www.cnblogs.com/guoew/p/12872981.html