Skip to content

Commit

Permalink
Merge pull request #287 from jburel/psql
Browse files Browse the repository at this point in the history
Psql 15 recommended
  • Loading branch information
jburel authored Feb 23, 2024
2 parents d83a1e2 + aaaf61f commit 62fe4f4
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
pg: pg16
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install shunit2
run: sudo apt-get install -y shunit2
- name: Build walkthroughs
Expand Down
2 changes: 1 addition & 1 deletion linux/install_ubuntu2204.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e -u -x

OMEROVER=${OMEROVER:-latest}
PGVER=${PGVER:-pg14}
PGVER=${PGVER:-pg15}
ICEVER=${ICEVER:-ice36}

. settings.env
Expand Down
10 changes: 5 additions & 5 deletions linux/step01_rocky9_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ if [ "$PGVER" = "pg13" ]; then
sed -i 's/ ident/ trust/g' /var/lib/pgsql/data/pg_hba.conf

elif [ "$PGVER" = "pg14" ]; then
#start-recommended-postgres
dnf -y install postgresql14-server postgresql14
if [ -f /.dockerenv ]; then
su - postgres -c "/usr/pgsql-14/bin/initdb -D /var/lib/pgsql/14/data --encoding=UTF8"
Expand All @@ -74,9 +73,9 @@ elif [ "$PGVER" = "pg14" ]; then
PGSETUP_INITDB_OPTIONS=--encoding=UTF8 /usr/pgsql-14/bin/postgresql-14-setup initdb
fi
sed -i.bak -re 's/^(host.*)ident/\1md5/' /var/lib/pgsql/14/data/pg_hba.conf
sed -i 's/ ident/ trust/g' /var/lib/pgsql/14/data/pg_hba.conf
#end-recommended-postgres
sed -i 's/ ident/ trust/g' /var/lib/pgsql/14/data/pg_hba.conf
elif [ "$PGVER" = "pg15" ]; then
#start-recommended-postgres
dnf -y install postgresql15-server postgresql15
if [ -f /.dockerenv ]; then
su - postgres -c "/usr/pgsql-15/bin/initdb -D /var/lib/pgsql/15/data --encoding=UTF8"
Expand All @@ -88,6 +87,7 @@ elif [ "$PGVER" = "pg15" ]; then
fi
sed -i.bak -re 's/^(host.*)ident/\1md5/' /var/lib/pgsql/15/data/pg_hba.conf
sed -i 's/ ident/ trust/g' /var/lib/pgsql/15/data/pg_hba.conf
#end-recommended-postgres
elif [ "$PGVER" = "pg16" ]; then
dnf -y install postgresql16-server postgresql16
if [ -f /.dockerenv ]; then
Expand All @@ -107,16 +107,16 @@ if [ -f /.dockerenv ]; then
su - postgres -c "/usr/bin/pg_ctl start -D /var/lib/pgsql/data -w"
else
if [ "$PGVER" = "pg13" ]; then
#start-recommended-pg-start
systemctl start postgresql
systemctl enable postgresql
#end-recommended-pg-start
elif [ "$PGVER" = "pg14" ]; then
systemctl start postgresql-14
systemctl enable postgresql-14
elif [ "$PGVER" = "pg15" ]; then
#start-recommended-pg-start
systemctl start postgresql-15
systemctl enable postgresql-15
#end-recommended-pg-start
elif [ "$PGVER" = "pg16" ]; then
systemctl start postgresql-16
systemctl enable postgresql-16
Expand Down
28 changes: 23 additions & 5 deletions linux/step01_ubuntu2204_pg_deps.sh
Original file line number Diff line number Diff line change
@@ -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
echo "deb http://apt.postgresql.org/pub/repos/apt jammy-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
elif [ "$PGVER" = "pg16" ]; then
apt-get install -y gnupg
echo "deb http://apt.postgresql.org/pub/repos/apt jammy-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

0 comments on commit 62fe4f4

Please sign in to comment.