Skip to content

Commit 87d22bb

Browse files
Loquacitycamscalejacobprall
authored
Update install instructions (github#359)
* Update install instructions * Change postgres to timescaledb repo * Add sudo * Remove extra whitespace * Update to correct key * Edits per feedback * Add step to install postgres repo * Apply suggestions from code review Co-authored-by: Cam Hutchison <[email protected]> Co-authored-by: Cam Hutchison <[email protected]> Co-authored-by: Jacob Prall <[email protected]>
1 parent 7fe0bb0 commit 87d22bb

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

timescaledb/how-to-guides/install-timescaledb/installation-apt-ubuntu.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,34 @@ non-obsolete releases.
1313
#### Build and install
1414

1515
<highlight type="warning">
16-
If you have another PostgreSQL installation not via `apt`,
16+
If you have another PostgreSQL installation not via `apt`,
1717
this will likely cause problems.
1818

1919
If you wish to maintain your current version of PostgreSQL outside
2020
of `apt`, we recommend installing from source. Otherwise, please be
2121
sure to remove non-`apt` installations before using this method.
2222
</highlight>
2323

24-
**If you don't already have PostgreSQL installed**, add PostgreSQL's third
25-
party repository to get the latest PostgreSQL packages (if you are using Ubuntu older than 19.04):
24+
Add the PostgreSQL third party repository to get the latest PostgreSQL packages:
2625
```bash
27-
# `lsb_release -c -s` should return the correct codename of your OS
28-
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -c -s)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
29-
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
30-
sudo apt-get update
26+
sudo apt install postgresql-common
27+
sudo sh /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
3128
```
3229

33-
Add TimescaleDB's third party repository and install TimescaleDB,
34-
which will download any dependencies it needs from the PostgreSQL repo:
35-
<highlight type="tip">
36-
Users coming from previous versions that have installed the PPA,
37-
need to add the new Ubuntu package repository for the release of TimescaleDB 2.4.
38-
</highlight>
39-
30+
Add the TimescaleDB third party repository and install TimescaleDB. This command
31+
downloads any required dependencies from the PostgreSQL repository:
4032
```bash
41-
# Add our repository
42-
sudo sh -c "echo 'deb https://packagecloud.io/timescale/timescaledb/ubuntu/ `lsb_release -c -s` main' > /etc/apt/sources.list.d/timescaledb.list"
43-
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo apt-key add -
33+
sudo sh -c "echo 'deb [signed-by=/usr/share/keyrings/timescale.keyring] https://packagecloud.io/timescale/timescaledb/ubuntu/ $(lsb_release -c -s) main' > /etc/apt/sources.list.d/timescaledb.list"
34+
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/timescale.keyring
4435
sudo apt-get update
4536

4637
# Now install appropriate package for PG version
4738
sudo apt install timescaledb-2-postgresql-13
4839
```
40+
<highlight type="tip">
41+
Users coming from previous versions that have installed the PPA need to add the
42+
new Ubuntu package repository for the release of TimescaleDB 2.4.
43+
</highlight>
4944

5045
#### Upgrading from TimescaleDB 1.x
5146
If you are upgrading from TimescaleDB 1.x, the `apt` package will first

0 commit comments

Comments
 (0)