@@ -20,64 +20,72 @@ The extension is installed by default on the
20
20
[ ` timescaledev/promscale-extension:latest-pg12 ` ] ( https://hub.docker.com/r/timescaledev/promscale-extension ) docker image.
21
21
22
22
For bare-metal installations, the full instructions for setting up PostgreSQL, TimescaleDB, and the Promscale Extension are:
23
+
24
+ 1 ) Install some necessary dependencies
25
+ ``` bash
26
+ sudo apt-get install -y wget curl gnupg2 lsb-release
27
+ ```
23
28
1) [Add the PostgreSQL APT repository (Ubuntu)](https://www.postgresql.org/download/linux/ubuntu/)
24
- ``` bash
25
- echo " deb http://apt.postgresql.org/pub/repos/apt/ $( lsb_release -c -s) -pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
26
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
27
- sudo apt-get update
28
- ```
29
- 1 ) Install PostgreSQL 13 and TimescaleDB
30
- ``` bash
31
- sudo add-apt-repository ppa:timescale/timescaledb-ppa
32
- sudo apt-get update
33
- sudo apt-get install timescaledb-2-postgresql-13
34
- ```
29
+ ` ` ` bash
30
+ echo " deb http://apt.postgresql.org/pub/repos/apt/ $( lsb_release -c -s) -pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
31
+ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
32
+ ` ` `
33
+ 1) Add the TimescaleDB APT repository
34
+ ` ` ` bash
35
+ echo " deb [signed-by=/usr/share/keyrings/timescale.keyring] https://packagecloud.io/timescale/timescaledb/ubuntu/ $( lsb_release -c -s) main" | sudo tee /etc/apt/sources.list.d/timescaledb.list
36
+ wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/timescale.keyring
37
+ ` ` `
38
+ 1) Install PostgreSQL with TimescaleDB
39
+ ` ` ` bash
40
+ sudo apt-get update
41
+ sudo apt-get install -y timescaledb-2-postgresql-14
42
+ ` ` `
35
43
1) Tune the PostgreSQL installation
36
- ``` bash
37
- sudo timescaledb-tune --quiet --yes
38
- sudo service postgresql restart
39
- ```
44
+ ` ` ` bash
45
+ sudo timescaledb-tune --quiet --yes
46
+ sudo service postgresql restart
47
+ ` ` `
40
48
1) Install dependencies for the PGX framework and promscale_extension
41
- ``` bash
42
- sudo apt-get install build-essential clang libssl-dev pkg-config libreadline-dev zlib1g-dev postgresql-server-dev-13
43
- ```
49
+ ` ` ` bash
50
+ sudo apt-get install -y build-essential clang libssl-dev pkg-config libreadline-dev zlib1g-dev postgresql-server-dev-14
51
+ ` ` `
44
52
1) [Install rust](https://www.rust-lang.org/tools/install).
45
- ``` bash
46
- curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
47
- source $HOME /.cargo/env
48
- ```
49
- 1 ) Install our fork of the PGX framework
50
- ``` bash
51
- cargo install --git https://github.com/JLockerman/pgx.git --branch timescale cargo-pgx
52
- ```
53
- 1 ) Initialize the PGX framework using the PostgreSQL 13 installation
54
- ``` bash
55
- cargo pgx init --pg13 =/usr/lib/postgresql/13 /bin/pg_config
56
- ```
53
+ ` ` ` bash
54
+ curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
55
+ source $HOME /.cargo/env
56
+ ` ` `
57
+ 1) Install the PGX framework
58
+ ` ` ` bash
59
+ cargo install cargo-pgx
60
+ ` ` `
61
+ 1) Initialize the PGX framework using the PostgreSQL 14 installation
62
+ ` ` ` bash
63
+ cargo pgx init --pg14 =/usr/lib/postgresql/14 /bin/pg_config
64
+ ` ` `
57
65
1) Download this repo and change directory into it
58
- ``` bash
59
- curl -L -o " promscale_extension.zip" " https://github.com/timescale/promscale_extension/archive/refs/tags/0.2 .0.zip"
60
- sudo apt-get install unzip
61
- unzip promscale_extension.zip
62
- cd promscale_extension-0.2 .0
63
- ```
66
+ ` ` ` bash
67
+ curl -L -o " promscale_extension.zip" " https://github.com/timescale/promscale_extension/archive/refs/tags/0.3 .0.zip"
68
+ sudo apt-get install unzip
69
+ unzip promscale_extension.zip
70
+ cd promscale_extension-0.3 .0
71
+ ` ` `
64
72
1) Compile and install
65
- ``` bash
66
- make
67
- sudo make install
68
- ```
73
+ ` ` ` bash
74
+ make
75
+ sudo make install
76
+ ` ` `
69
77
1) Create a PostgreSQL user and database for promscale (use an appropriate password! )
70
- ``` bash
71
- sudo -u postgres psql -c " CREATE USER promscale SUPERUSER PASSWORD 'promscale';"
72
- sudo -u postgres psql -c " CREATE DATABASE promscale OWNER promscale;"
73
- ```
78
+ ` ` ` bash
79
+ sudo -u postgres psql -c " CREATE USER promscale SUPERUSER PASSWORD 'promscale';"
80
+ sudo -u postgres psql -c " CREATE DATABASE promscale OWNER promscale;"
81
+ ` ` `
74
82
1) [Download and run promscale (it will install the extension in the PostgreSQL database)](https://github.com/timescale/promscale/blob/master/docs/bare-metal-promscale-stack.md#2-deploying-promscale)
75
- ``` bash
76
- LATEST_VERSION=$( curl -s https://api.github.com/repos/timescale/promscale/releases/latest | grep " tag_name" | cut -d' "' -f4)
77
- curl -L -o promscale " https://github.com/timescale/promscale/releases/download/${LATEST_VERSION} /promscale_${LATEST_VERSION} _Linux_x86_64"
78
- chmod +x promscale
79
- ./promscale --db-name promscale --db-password promscale --db-user promscale --db-ssl-mode allow --install-extensions
80
- ```
83
+ ` ` ` bash
84
+ LATEST_VERSION=$( curl -s https://api.github.com/repos/timescale/promscale/releases/latest | grep " tag_name" | cut -d' "' -f4)
85
+ curl -L -o promscale " https://github.com/timescale/promscale/releases/download/${LATEST_VERSION} /promscale_${LATEST_VERSION} _Linux_x86_64"
86
+ chmod +x promscale
87
+ ./promscale --db-name promscale --db-password promscale --db-user promscale --db-ssl-mode allow --install-extensions
88
+ ` ` `
81
89
82
90
This extension will be created via ` CREATE EXTENSION` automatically by the Promscale connector and should not be created manually.
83
91
0 commit comments