Wednesday, February 16, 2022

Deploy TimescaleDB on Rocky Linux 8.5

 in This Tutorial you will Learn "  How To Install TimescaleDB on Rocky Linux 8.5"

TimescaleDB is a free, open-source, powerful database system powered by PostgreSQL. It is an extension of PostgreSQL and is specially designed to analyze time-series data with PostgreSQL. TimescaleDB is very similar to PostgreSQL, but it is optimized for speed and scale. Generally, relational databases are mainly used to store data, and they cannot handle the large volumes of time series data. This where TimescaleDB excels; it combines the speed of NoSQL databases and the ease-of-use of relational databases.
Homepage - https://www.timescale.com/
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      | IP -192.168.1.60        |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/system-release ; hostname ; hostname -I ; sestatus ; dnf groupinstall "Development Tools" -y

dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
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

dnf -qy module disable postgresql ; dnf -y install postgresql14 postgresql14-server
dnf install timescaledb-2-postgresql-14 -y
/usr/pgsql-14/bin/postgresql-14-setup initdb
systemctl start postgresql-14 ; systemctl enable postgresql-14 ; systemctl status postgresql-14

su - postgres
gedit /var/lib/pgsql/14/data/postgresql.conf &>/dev/null
shared_preload_libraries = 'timescaledb'
sudo su - postgres
psql
CREATE database test_db;
\c test_db
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
systemctl restart postgresql-14
_________________________________________________________________________________________

No comments:

Post a Comment