本文主要是介绍数据库:单机基于postgresql-15安装timescaledb,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
配置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
<<<<
# 设置postgres的密码
\password postgres# 创建timescaledb扩展
CREATE EXTENSION IF NOT EXISTS timescaledb;# 查看timescaledb是否已经安装好了
\dx
>>>>
这篇关于数据库:单机基于postgresql-15安装timescaledb的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!