From df888cd4d33555570ac1f45e05b3fd3e870e4110 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Thu, 22 Feb 2024 17:39:59 +0000 Subject: [PATCH] install psql 15 and 16 --- linux/install_ubuntu2204.sh | 2 +- linux/step01_ubuntu2204_pg_deps.sh | 28 +++++++++++++++++++++++----- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/linux/install_ubuntu2204.sh b/linux/install_ubuntu2204.sh index ee02f8f3..e91b13bb 100644 --- a/linux/install_ubuntu2204.sh +++ b/linux/install_ubuntu2204.sh @@ -3,7 +3,7 @@ set -e -u -x OMEROVER=${OMEROVER:-latest} -PGVER=${PGVER:-pg14} +PGVER=${PGVER:-pg15} ICEVER=${ICEVER:-ice36} . settings.env diff --git a/linux/step01_ubuntu2204_pg_deps.sh b/linux/step01_ubuntu2204_pg_deps.sh index eb251c12..f68995db 100644 --- a/linux/step01_ubuntu2204_pg_deps.sh +++ b/linux/step01_ubuntu2204_pg_deps.sh @@ -1,7 +1,25 @@ #!/bin/bash -#start-recommended -apt-get update -apt-get -y install postgresql -service postgresql start -#end-recommended +PGVER=${PGVER:-pg15} + +if [ "$PGVER" = "pg14" ]; then + #start-recommended + apt-get update + apt-get -y install postgresql + service postgresql start + #end-recommended +elif [ "$PGVER" = "pg15" ]; then + apt-get install -y gnupg + sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' + wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null + apt-get update + apt-get -y install postgresql-15 + service postgresql start +elif [ "$PGVER" = "pg16" ]; then + apt-get install -y gnupg + sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' + wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null + apt-get update + apt-get -y install postgresql-16 + service postgresql start +fi