赞
踩
cd /usr
https://www.postgresql.org/download/linux/redhat/
yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install -y postgresql12-server
/usr/pgsql-12/bin/postgresql-12-setup initdb
systemctl enable postgresql-12
systemctl start postgresql-12
可以看到,此时postgresql已经启动成功
ALTER USER postgres WITH PASSWORD 'postgres'; //修改当前用户密码
官网地址:https://docs.timescale.com/latest/getting-started/installation/rhel-centos/installation-yum
cat > /etc/yum.repos.d/timescale_timescaledb.repo <<EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/7/\$basearch
repo_gpgcheck=1
gpgcheck=0
enabled=1
gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
EOL
sudo yum update -y
sudo yum install -y timescaledb-postgresql-12
最终显示安装完成
vim /var/lib/pgsql/12/data/postgresql.conf
在末尾添加: shared_preload_libraries = ‘timescaledb’
service postgresql-12 stop
service postgresql-12 start
su postgres
psql
create extension timescaledb;
如果出现下图则安装成功:
service postgresql-12 stop
service postgresql-12 start
由于版本原因Navicat12不能看见 postgresql内部表信息,所以需要升级到Navicat15
连接成功!!!!
我们可以看到默认库如下,如果没有TimescaleDB,数据库中只有public,现在多了一些timescale-***
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。