Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

PostgreSQL 12 Upgrade


Windows Installation


PostgreSQL fresh Install on Windows

  1. Go to nexus Refer Windows Installation to download InSights_Windows Windows Postgres Package
  2. Go to server2/postgresql-12.5-1-windows package
  3. Run command "Postgresql-12-DB-SetUp.bat" from server2 file, this will create "data" folder inside postgresql-12.5-1-windows.
  4. It will also replace pg_hba.conf and postgresql.conf inside data ,If any server specific changes please do the needed
  5. Run command "Postgresql-12-DB-StartUp.bat" to start PostgreSQL database
  6. Register PostgreSQL service using following command (make sure that user has Administrator privilege )

...

pg_ctl -D "C:/InSights_Windows/Server2/postgresql-9.5.4-1/pgsql/data" start
To stop manually:
pg_ctl -D "C:/InSights_Windows/Server2/postgresql-9.5.4-1/pgsql/data" stop

PostgreSQL Upgrade on windows

  1. Make sure that existing postgres 9.5 working
  2. Take backup of existing database using following command from \postgresql-9.5.4-1\pgsql\bin\ folder

...

  1. Stop existing postgres 9.5 database
  2. Go to nexus download Windows Postgres Package, postgresqlPostgresql-12.5-1-windows package located under InSights_Windows/server2
  3. Copy this package under InSights_Windows/server2 folder along with Postgresql-12-DB-SetUp.bat and Postgresql-12-DB-StartUp.bat files.
  4. Run command "Postgresql-12-DB-SetUp.bat" from server2 file, this will create "data" folder inside postgresql-12.5-1-windows.
  5. It will also replace pg_hba.conf and postgresql.conf inside data ,If any server specific changes please do the needed
  6. Run command "Postgresql-12-DB-StartUp.bat" to start PostgreSQL database
  7. Register PostgreSQL service using following command (make sure that user has Administrator privilege )

...

RHEL7/Centos Installation


PostgreSQL fresh Install on RHEL7/Centos

  1. Download Refer PostgreSQL Installation to download installation script from RHEL Link .
  2. Change permission of script to 777 or 775
  3. Execute script ./ insights_postgres12.sh
  4. Check status of service using

...

sudo /usr/pgadmin4/bin/setup-web.sh

PostgreSQL Upgrade on RHEL7

  1. Make sure that existing postgres 9.5 working
  2. Take backup of existing database using following command

...

  1. Stop existing postgres 9.5 database
      Download
      1. Refer PostgreSQL Installation to download installation script
      from RHEL Link
      1. .
    1. Change permission of script to 777 or 775
    2. Execute script ./ insights_postgres12.sh
    3. Check status of service using

    ...

    /usr/pgsql-12/bin/pg_restore --host "localhost" --port "5432" --username "grafana" --no-password --dbname "insight" --verbose "/home/postgresBackup/insights.sql"
    /usr/pgsql-12/bin/pg_restore --host "localhost" --port "5432" --username "grafana" --no-password --dbname "grafana" --verbose "/home/postgresBackup/grafana.sql"

    Ubuntu Installation


    PostgreSQL fresh Install on Ubuntu

    1. Download Refer PostgreSQL Installation to download UBUNTU installation script from Ubuntu Script .
    2. Change permission of script to 777 or 775
    3. Execute script ./insights_postgre12_Ubuntu.sh
    4. Check status of service using

    ...

    sudo /usr/pgadmin4/bin/setup-web.sh

    PostgreSQL Upgrade on Ubuntu

    1. Make sure that existing postgres 9.5 working
    2. Take backup of existing database using following command

    ...

    1. Stop existing postgres 9.5 database
    2. Download Refer PostgreSQL Installation to download UBUNTU installation script from Ubuntu Script .
    3. Change permission of script to 777 or 775
    4. Execute script ./insights_postgre12_Ubuntu.sh
    5. Check status of service using

    ...