Install and configure TimescaleDB on Postgres
This section shows you how to install the latest version of Postgres and TimescaleDB on a supported platform using the packages supplied by Tiger Data.
If you have previously installed Postgres without a package manager, you may encounter errors following these install instructions. Best practice is to fully remove any existing Postgres installations before you begin.
To keep your current Postgres installation, [Install from source][install-from-source].
Install the latest Postgres packages
Run the Postgres package setup script
Add the TimescaleDB package
Install the TimescaleDB GPG key
Update your local repository list
Install TimescaleDB
To install a specific TimescaleDB [release][releases-page], set the version. For example:
sudo apt-get install timescaledb-2-postgresql-14='2.6.0*' timescaledb-2-loader-postgresql-14='2.6.0*'
Older versions of TimescaleDB may not support all the OS versions listed on this page.
- Tune your Postgres instance for TimescaleDB
By default, this script is included with the timescaledb-tools package when you install TimescaleDB. Use the prompts to tune your development or production environment. For more information on manual configuration, see [Configuration][config]. If you have an issue, run sudo apt install timescaledb-tools.
Restart Postgres
Log in to Postgres as
postgres
You are in the psql shell.
- Set the password for
postgres
When you have set the password, type \q to exit psql.
Install the latest Postgres packages
Run the Postgres package setup script
Install the TimescaleDB GPG key
For Ubuntu 21.10 and earlier use the following command:
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo apt-key add -
Update your local repository list
Install TimescaleDB
To install a specific TimescaleDB [release][releases-page], set the version. For example:
sudo apt-get install timescaledb-2-postgresql-14='2.6.0*' timescaledb-2-loader-postgresql-14='2.6.0*'
Older versions of TimescaleDB may not support all the OS versions listed on this page.
- Tune your Postgres instance for TimescaleDB
By default, this script is included with the timescaledb-tools package when you install TimescaleDB. Use the prompts to tune your development or production environment. For more information on manual configuration, see [Configuration][config]. If you have an issue, run sudo apt install timescaledb-tools.
Restart Postgres
Log in to Postgres as
postgres
You are in the psql shell.
- Set the password for
postgres
When you have set the password, type \q to exit psql.
Install the latest Postgres packages
Add the TimescaleDB repository
Update your local repository list
Install TimescaleDB
To avoid errors, do not install TimescaleDB Apache 2 Edition and TimescaleDB Community Edition at the same time.
On Red Hat Enterprise Linux 8 and later, disable the built-in Postgres module:
sudo dnf -qy module disable postgresql
Initialize the Postgres instance
Tune your Postgres instance for TimescaleDB
This script is included with the timescaledb-tools package when you install TimescaleDB. For more information, see [configuration][config].
Enable and start Postgres
Log in to Postgres as
postgres
You are now in the psql shell.
- Set the password for
postgres
When you have set the password, type \q to exit psql.
Install the latest Postgres packages
Add the TimescaleDB repository
Update your local repository list
Install TimescaleDB
To avoid errors, do not install TimescaleDB Apache 2 Edition and TimescaleDB Community Edition at the same time.
On Red Hat Enterprise Linux 8 and later, disable the built-in Postgres module:
sudo dnf -qy module disable postgresql
Initialize the Postgres instance
Tune your Postgres instance for TimescaleDB
This script is included with the timescaledb-tools package when you install TimescaleDB. For more information, see [configuration][config].
Enable and start Postgres
Log in to Postgres as
postgres
You are now in the psql shell.
- Set the password for
postgres
When you have set the password, type \q to exit psql.
Tiger Data supports Rocky Linux 8 and 9 on amd64 only.
Update your local repository list
Install the latest Postgres packages
Add the TimescaleDB repository
Disable the built-in PostgreSQL module
This is for Rocky Linux 9 only.
- Install TimescaleDB
To avoid errors, do not install TimescaleDB Apache 2 Edition and TimescaleDB Community Edition at the same time.
Initialize the Postgres instance
Tune your Postgres instance for TimescaleDB
This script is included with the timescaledb-tools package when you install TimescaleDB. For more information, see [configuration][config].
Enable and start Postgres
Log in to Postgres as
postgres
You are now in the psql shell.
- Set the password for
postgres
When you have set the password, type \q to exit psql.
ArchLinux packages are built by the community.
Install the latest Postgres and TimescaleDB packages
Initalize your Postgres instance
Tune your Postgres instance for TimescaleDB
This script is included with the timescaledb-tools package when you install TimescaleDB. For more information, see [configuration][config].
Enable and start Postgres
Log in to Postgres as
postgres
You are in the psql shell.
- Set the password for
postgres
When you have set the password, type \q to exit psql.
Job jobbed, you have installed Postgres and TimescaleDB.