Skip to content

Commit

Permalink
Update install instructions (github#359)
Browse files Browse the repository at this point in the history
* 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 <35285934+camscale@users.noreply.github.com>

Co-authored-by: Cam Hutchison <35285934+camscale@users.noreply.github.com>
Co-authored-by: Jacob Prall <prall.jacob@gmail.com>
  • Loading branch information
3 people authored Sep 10, 2021
1 parent 7fe0bb0 commit 87d22bb
Showing 1 changed file with 12 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,34 @@ non-obsolete releases.
#### Build and install

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

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

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

Add TimescaleDB's third party repository and install TimescaleDB,
which will download any dependencies it needs from the PostgreSQL repo:
<highlight type="tip">
Users coming from previous versions that have installed the PPA,
need to add the new Ubuntu package repository for the release of TimescaleDB 2.4.
</highlight>

Add the TimescaleDB third party repository and install TimescaleDB. This command
downloads any required dependencies from the PostgreSQL repository:
```bash
# Add our repository
sudo sh -c "echo 'deb https://packagecloud.io/timescale/timescaledb/ubuntu/ `lsb_release -c -s` main' > /etc/apt/sources.list.d/timescaledb.list"
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo apt-key add -
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"
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/timescale.keyring
sudo apt-get update

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

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

0 comments on commit 87d22bb

Please sign in to comment.