配置yum
sudo yum install https://download.postgresql.org/pub/repos/yum/reporpms/F-$(rpm -E %{fedora})-x86_64/pgdg-fedora-repo-latest.noarch.rpm
配置yum源
sudo tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOL
[timescale_timescaledb]
name=timescale_timescaledb
baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$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
安装timescaledb
yum update
yum install timescaledb-2-postgresql-15 postgresql15
初始化pgsql
/usr/pgsql-15/bin/postgresql-15-setup initdb
为 TimescaleDB 调整 PostgreSQL 的参数
timescaledb-tune --pg-config=/usr/pgsql-15/bin/pg_config
启动pgsql
systemctl enable postgresql-15
systemctl start postgresql-15
安装timescaledb扩展
sudo -u postgres psql
<<<<
\password postgres
CREATE EXTENSION IF NOT EXISTS timescaledb;
\dx
>>>>