Skip to content

Commit

Permalink
Modify psql installation
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Nov 4, 2024
1 parent ffbf21c commit fc3d4f1
Showing 1 changed file with 6 additions and 23 deletions.
29 changes: 6 additions & 23 deletions linux/step01_ubuntu2404_pg_deps.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
#!/bin/bash

PGVER=${PGVER:-pg15}

if [ "$PGVER" = "pg14" ]; then
apt-get update
apt-get -y install postgresql
service postgresql start
elif [ "$PGVER" = "pg15" ]; then
#start-recommended
apt-get install -y gnupg
echo "deb http://apt.postgresql.org/pub/repos/apt noble-pgdg main" > /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt-get update
apt-get -y install postgresql-15
service postgresql start
#end-recommended
elif [ "$PGVER" = "pg16" ]; then
apt-get install -y gnupg
echo "deb http://apt.postgresql.org/pub/repos/apt noble-pgdg main" > /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt-get update
apt-get -y install postgresql-16
service postgresql start
fi
PGVER=${PGVER:-pg16}
#start-recommended
apt-get update
apt-get -y install postgresql
service postgresql start
#end-recommended

0 comments on commit fc3d4f1

Please sign in to comment.