#!/bin/bash # Script to install Postgres & TimescaleDB on the VM. # Note: This is usually packaged in the OVA, so if you deploy a VM with OVA, it should # automatically have postgres and timescaledb. This script is provided just in case manual # installation is needed. set -euo pipefail source /opt/local/bin/libs.sh # install the repository RPM sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm # install the client packages sudo yum install -y postgresql12 # install the server packages sudo yum install -y postgresql12-server log_msg "Successfully installed Postgres." # Add TimescaleDB's third party repository and install TimescaleDB, which will download any # dependencies it needs from the PostgreSQL repo # Add our repo sudo tee /etc/yum.repos.d/timescale_timescaledb.repo <