diff --git a/install/adventurelog-install.sh b/install/adventurelog-install.sh index 4b6c0c552..d6de98420 100644 --- a/install/adventurelog-install.sh +++ b/install/adventurelog-install.sh @@ -25,10 +25,9 @@ $STD apt-get install -y \ msg_ok "Installed Dependencies" NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules -PG_VERSION="16" install_postgresql +PG_VERSION="16" PG_MODULES="postgis" install_postgresql -msg_info "Install/Set up PostgreSQL Database" -$STD apt-get install -y postgresql-16-postgis +msg_info "Set up PostgreSQL Database" DB_NAME="adventurelog_db" DB_USER="adventurelog_user" DB_PASS="$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)" diff --git a/install/authentik-install.sh b/install/authentik-install.sh index 63b8b3c15..8ed0dacc3 100644 --- a/install/authentik-install.sh +++ b/install/authentik-install.sh @@ -37,7 +37,7 @@ $STD apt-get install -y \ msg_ok "Installed Dependencies" setup_uv -PG_VERSION="16" install_postgresql +PG_VERSION="16" PG_MODULES="contrib" install_postgresql NODE_VERSION="22" install_node_and_modules install_go @@ -61,8 +61,7 @@ cat </etc/GeoIP.conf EOF msg_ok "Installed GeoIP" -msg_info "Installing PostgreSQL" -$STD apt-get install -y postgresql-16 postgresql-contrib-16 +msg_info "Setup PostgreSQL Database" DB_NAME="authentik" DB_USER="authentik" DB_PASS="$(openssl rand -base64 18 | cut -c1-13)" diff --git a/install/baikal-install.sh b/install/baikal-install.sh index da5054684..b5c293736 100644 --- a/install/baikal-install.sh +++ b/install/baikal-install.sh @@ -15,25 +15,26 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - postgresql \ - apache2 \ - libapache2-mod-php \ - php-{pgsql,dom} + apache2 \ + libapache2-mod-php \ + php-{pgsql,dom} msg_ok "Installed Dependencies" -msg_info "Setting up PostgreSQL" +PG_VERSION="16" install_postgresql + +msg_info "Setting up PostgreSQL Database" DB_NAME=baikal DB_USER=baikal DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) $STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';" $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;" { - echo "Baikal Credentials" - echo "Baikal Database User: $DB_USER" - echo "Baikal Database Password: $DB_PASS" - echo "Baikal Database Name: $DB_NAME" + echo "Baikal Credentials" + echo "Baikal Database User: $DB_USER" + echo "Baikal Database Password: $DB_PASS" + echo "Baikal Database Name: $DB_NAME" } >>~/baikal.creds -msg_ok "Set up PostgreSQL" +msg_ok "Set up PostgreSQL Database" msg_info "Installing Baikal" RELEASE=$(curl -fsSL https://api.github.com/repos/sabre-io/Baikal/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') diff --git a/install/freshrss-install.sh b/install/freshrss-install.sh index 679737d7a..a151f2cf2 100644 --- a/install/freshrss-install.sh +++ b/install/freshrss-install.sh @@ -15,12 +15,13 @@ update_os msg_info "Installing Dependencies" $STD apt-get install -y \ - postgresql \ apache2 \ php-{curl,dom,json,ctype,pgsql,gmp,mbstring,iconv,zip} \ libapache2-mod-php msg_ok "Installed Dependencies" +PG_VERSION="16" install_postgresql + msg_info "Setting up PostgreSQL" DB_NAME=freshrss DB_USER=freshrss diff --git a/install/netbox-install.sh b/install/netbox-install.sh index 165410f12..967a010c4 100644 --- a/install/netbox-install.sh +++ b/install/netbox-install.sh @@ -17,7 +17,6 @@ msg_info "Installing Dependencies" $STD apt-get install -y \ apache2 \ redis-server \ - postgresql \ build-essential \ libxml2-dev \ libxslt1-dev \ @@ -27,6 +26,8 @@ $STD apt-get install -y \ zlib1g-dev msg_ok "Installed Dependencies" +PG_VERSION="16" install_postgresql + msg_info "Installing Python" $STD apt-get install -y \ python3 \ diff --git a/install/paperless-ngx-install.sh b/install/paperless-ngx-install.sh index b1cd99331..e212eb7b0 100644 --- a/install/paperless-ngx-install.sh +++ b/install/paperless-ngx-install.sh @@ -16,7 +16,6 @@ update_os msg_info "Installing Dependencies (Patience)" $STD apt-get install -y \ redis \ - postgresql \ build-essential \ imagemagick \ fonts-liberation \ @@ -37,6 +36,8 @@ $STD apt-get install -y \ libleptonica-dev msg_ok "Installed Dependencies" +PG_VERSION="16" install_postgresql + msg_info "Setup Python3" $STD apt-get install -y \ python3 \ diff --git a/install/postgresql-install.sh b/install/postgresql-install.sh index ce4503bd6..e12462536 100644 --- a/install/postgresql-install.sh +++ b/install/postgresql-install.sh @@ -13,19 +13,7 @@ setting_up_container network_check update_os -msg_info "Installing Dependencies" -$STD apt-get install -y gnupg -msg_ok "Installed Dependencies" - -msg_info "Setting up PostgreSQL Repository" -VERSION="$(awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release)" -echo "deb http://apt.postgresql.org/pub/repos/apt ${VERSION}-pgdg main" >/etc/apt/sources.list.d/pgdg.list -curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor --output /etc/apt/trusted.gpg.d/postgresql.gpg -msg_ok "Setup PostgreSQL Repository" - -msg_info "Installing PostgreSQL" -$STD apt-get update -$STD apt-get install -y postgresql +PG_VERSION="17" install_postgresql cat </etc/postgresql/17/main/pg_hba.conf # PostgreSQL Client Authentication Configuration File @@ -127,7 +115,7 @@ default_text_search_config = 'pg_catalog.english' include_dir = 'conf.d' EOF -sudo systemctl restart postgresql +systemctl restart postgresql msg_ok "Installed PostgreSQL" read -r -p "${TAB3}Would you like to add Adminer? " prompt