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