需要至少16.04或以上版本,通过apt安装TimescaleDB
sudo add-apt-repository ppa:timescale/timescaledb-ppa sudo apt-get update sudo apt install timescaledb
shared_preload_libraries = 'timescaledb'
为postgres用户配置密码
sudo -u postgres psql postgres \password postgres #输入密码 \q #退出
修改/etc/postgresql/9.6/main/pg_hba.conf
找到
local all postgres peer
local all all peer
host all all ::1/128 ident
将peer与ident换为md5
然后重启postgresql服务
sudo service postgresql restart
登陆postgres进行验证
psql -U postgres -W
然后输入刚刚设置的密码即可进入 psql console