Update postgresql-install.sh
changed to support postgresql 16 instead of 17
This commit is contained in:
parent
15e8699d09
commit
370e61dc6d
@ -4,6 +4,7 @@
|
|||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# modified by dd, to install postgres 16 not 17
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@ -28,9 +29,9 @@ msg_ok "Setup PostgreSQL Repository"
|
|||||||
|
|
||||||
msg_info "Installing PostgreSQL"
|
msg_info "Installing PostgreSQL"
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y postgresql
|
$STD apt-get install -y postgresql-16
|
||||||
|
|
||||||
cat <<EOF >/etc/postgresql/17/main/pg_hba.conf
|
cat <<EOF >/etc/postgresql/16/main/pg_hba.conf
|
||||||
# PostgreSQL Client Authentication Configuration File
|
# PostgreSQL Client Authentication Configuration File
|
||||||
local all postgres peer
|
local all postgres peer
|
||||||
# TYPE DATABASE USER ADDRESS METHOD
|
# TYPE DATABASE USER ADDRESS METHOD
|
||||||
@ -49,7 +50,7 @@ host replication all 127.0.0.1/32 scram-sha-256
|
|||||||
host replication all ::1/128 scram-sha-256
|
host replication all ::1/128 scram-sha-256
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<EOF >/etc/postgresql/17/main/postgresql.conf
|
cat <<EOF >/etc/postgresql/16/main/postgresql.conf
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# PostgreSQL configuration file
|
# PostgreSQL configuration file
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
@ -58,10 +59,10 @@ cat <<EOF >/etc/postgresql/17/main/postgresql.conf
|
|||||||
# FILE LOCATIONS
|
# FILE LOCATIONS
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
data_directory = '/var/lib/postgresql/17/main'
|
data_directory = '/var/lib/postgresql/16/main'
|
||||||
hba_file = '/etc/postgresql/17/main/pg_hba.conf'
|
hba_file = '/etc/postgresql/16/main/pg_hba.conf'
|
||||||
ident_file = '/etc/postgresql/17/main/pg_ident.conf'
|
ident_file = '/etc/postgresql/16/main/pg_ident.conf'
|
||||||
external_pid_file = '/var/run/postgresql/17-main.pid'
|
external_pid_file = '/var/run/postgresql/16-main.pid'
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# CONNECTIONS AND AUTHENTICATION
|
# CONNECTIONS AND AUTHENTICATION
|
||||||
@ -107,7 +108,7 @@ log_timezone = 'Etc/UTC'
|
|||||||
# PROCESS TITLE
|
# PROCESS TITLE
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
cluster_name = '17/main'
|
cluster_name = '16/main'
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# CLIENT CONNECTION DEFAULTS
|
# CLIENT CONNECTION DEFAULTS
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user