diff --git a/templates/downloads/js/yum.js b/templates/downloads/js/yum.js index 74b5702..6953e0b 100644 --- a/templates/downloads/js/yum.js +++ b/templates/downloads/js/yum.js @@ -121,11 +121,7 @@ function archChanged() { var arch = document.getElementById('arch').value; if (!plat || plat == -1) { - document.getElementById('reporpm').innerHTML = 'Select version and platform above'; - document.getElementById('clientpackage').innerHTML = 'Select version and platform above'; - document.getElementById('serverpackage').innerHTML = 'Select version and platform above'; - document.getElementById('initdb').innerHTML = 'Select version and platform above'; - document.getElementById('dnfmodule').style.display = 'none'; + document.getElementById('script').innerHTML = 'Select version and platform above'; return; } @@ -135,21 +131,30 @@ function archChanged() { var url = 'https://download.postgresql.org/pub/repos/yum/reporpms/' + plat + '-' + arch + '/pgdg-' + get_rpm_prefix(plat) +'-repo-latest.noarch.rpm'; var installer = get_installer(plat); - document.getElementById('reporpm').innerHTML = installer + ' install ' + url; - document.getElementById('clientpackage').innerHTML = installer + ' install postgresql' + shortver; - document.getElementById('serverpackage').innerHTML = installer + ' install postgresql' + shortver + '-server'; + script = document.getElementById('script') + script.innerHTML = '# Install the repository RPM:
'; + script.innerHTML += installer + ' install ' + url + '

'; - document.getElementById('dnfmodule').style.display = disable_module_on(plat) ? 'list-item' : 'none'; + script.innerHTML += '# Install client tools:
'; + script.innerHTML += installer + ' install postgresql' + shortver + '

'; + script.innerHTML += '# Optionally install the database server:
'; + script.innerHTML += installer + ' install postgresql' + shortver + '-server

'; + + if (disable_module_on(plat)) { + script.innerHTML += '# Disable the built-in PostgreSQL module:
'; + script.innerHTML += 'dnf -qy module disable postgresql

'; + } + + script.innerHTML += '# Optionally initialize the database and enable automatic start:
'; if (uses_systemd(plat)) { var setupcmd = 'postgresql-' + shortver + '-setup'; if (ver < 10) { - setupcmd = 'postgresql' + shortver + '-setup'; + setupcmd = 'postgresql' + shortver + '-setup'; } - - document.getElementById('initdb').innerHTML = '/usr/pgsql-' + ver + '/bin/' + setupcmd + ' initdb
systemctl enable postgresql-' + ver + '
systemctl start postgresql-' + ver; + script.innerHTML += '/usr/pgsql-' + ver + '/bin/' + setupcmd + ' initdb
systemctl enable postgresql-' + ver + '
systemctl start postgresql-' + ver; } else { - document.getElementById('initdb').innerHTML = 'service postgresql-' + ver + ' initdb
chkconfig postgresql-' + ver + ' on
service postgresql-' + ver + ' start'; + script.innerHTML += 'service postgresql-' + ver + ' initdb
chkconfig postgresql-' + ver + ' on
service postgresql-' + ver + ' start'; } } diff --git a/templates/pages/download/linux/debian.html b/templates/pages/download/linux/debian.html index 0944edb..7824089 100644 --- a/templates/pages/download/linux/debian.html +++ b/templates/pages/download/linux/debian.html @@ -41,30 +41,16 @@ versions of Debian:

To use the apt repository, follow these steps:

-
    -
  1. - -
  2. -
  3. - Create the file /etc/apt/sources.list.d/pgdg.list, and add a line - for the repository: -
    -     deb http://apt.postgresql.org/pub/repos/apt/ YOUR_DEBIAN_VERSION_HERE-pgdg main
    -
  4. -
  5. - Import the repository signing key, and update the package lists: -
    -     wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
    -     sudo apt-get update
    -
  6. -
+ +
# Create the file repository configuration:
+sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
+
+# Import the repository signing key:
+wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
+
+# Update the package lists
+sudo apt-get update
+

For more information about the apt repository, including answers to frequent questions, please see the apt page on diff --git a/templates/pages/download/linux/redhat.html b/templates/pages/download/linux/redhat.html index bc309d6..22e9a27 100644 --- a/templates/pages/download/linux/redhat.html +++ b/templates/pages/download/linux/redhat.html @@ -59,20 +59,8 @@ To use the PostgreSQL Yum Repository, follow these steps:

  • Select version:
  • Select platform:
  • Select architecture:
  • -
  • Install the repository RPM: -
    
    -  
  • -
  • Disable the built-in PostgreSQL module -
    dnf -qy module disable postgresql
    -
  • -
  • Install the client packages: -
    
    -  
  • -
  • Optionally install the server packages: -
    
    -  
  • -
  • Optionally initialize the database and enable automatic start: -
    
    +  
  • Copy, paste and run the relevant parts of the setup script: +
    
       
  • diff --git a/templates/pages/download/linux/ubuntu.html b/templates/pages/download/linux/ubuntu.html index 5675e81..f9f1ba1 100644 --- a/templates/pages/download/linux/ubuntu.html +++ b/templates/pages/download/linux/ubuntu.html @@ -40,25 +40,16 @@ by using the closest LTS version available.

    To use the apt repository, follow these steps:

    - +

    For more information about the apt repository, including answers to frequent questions, please see the PostgreSQL Apt Repository page on