Monday, December 7, 2020

How To Install TimescaleDB On Ubuntu 18.04 With PostgreSQL

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

TimescaleDB is an open-source database designed to make SQL scalable for time-series data.

PostgreSQL, also known as Postgres, is a free and open-source relational database management system emphasizing extensibility and SQL compliance.
Offcial Website: https://www.timescale.com/
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Our Server Specification-     
Os:Ubuntu 18.04 LTS Bionic Beaver 64Bit   | IP address- 192.168.1.50  | Hostname :www.yourdomain.com
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
lsb_release -cd ; hostname ; hostname -I ; whoami ; getconf LONG_BIT ; apt update ; apt install -y build-essential software-properties-common git curl gdebi net-tools wget sqlite3 dirmngr nano lsb-release apt-transport-https -y

add-apt-repository ppa:timescale/timescaledb-ppa -y
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
cat >/etc/apt/sources.list.d/pgdg.list<<EOF
deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main
EOF
apt-get update ; apt install timescaledb-postgresql-10 postgresql-10 -y

su - postgres
psql -c "alter user postgres with password 'toor'"
leafpad  /etc/postgresql/10/main/postgresql.conf &>/dev/null
shared_preload_libraries = 'timescaledb'

systemctl restart postgresql
su - postgres
psql
CREATE database test_db;
\c test_db
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
psql -U postgres -h localhost -d test_db

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment