PostgreSQL 12 Upgrade
Windows Installation
PostgreSQL fresh Install on Windows
- Go to nexus Refer Windows Installation to download InSights_Windows Windows Postgres Package
- Go to server2/postgresql-12.5-1-windows package
- Run command "Postgresql-12-DB-SetUp.bat" from server2 file, this will create "data" folder inside postgresql-12.5-1-windows.
- It will also replace pg_hba.conf and postgresql.conf inside data ,If any server specific changes please do the needed
- Run command "Postgresql-12-DB-StartUp.bat" to start PostgreSQL database
- 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
- Make sure that existing postgres 9.5 working
- Take backup of existing database using following command from \postgresql-9.5.4-1\pgsql\bin\ folder
...
- Stop existing postgres 9.5 database
- Go to nexus download Windows Postgres Package, postgresqlPostgresql-12.5-1-windows package located under InSights_Windows/server2
- Copy this package under InSights_Windows/server2 folder along with Postgresql-12-DB-SetUp.bat and Postgresql-12-DB-StartUp.bat files.
- Run command "Postgresql-12-DB-SetUp.bat" from server2 file, this will create "data" folder inside postgresql-12.5-1-windows.
- It will also replace pg_hba.conf and postgresql.conf inside data ,If any server specific changes please do the needed
- Run command "Postgresql-12-DB-StartUp.bat" to start PostgreSQL database
- Register PostgreSQL service using following command (make sure that user has Administrator privilege )
...
RHEL7/Centos Installation
PostgreSQL fresh Install on RHEL7/Centos
- Download Refer PostgreSQL Installation to download installation script from RHEL Link .
- Change permission of script to 777 or 775
- Execute script ./ insights_postgres12.sh
- Check status of service using
...
sudo /usr/pgadmin4/bin/setup-web.sh
PostgreSQL Upgrade on RHEL7
- Make sure that existing postgres 9.5 working
- Take backup of existing database using following command
...
- Stop existing postgres 9.5 database
- Refer PostgreSQL Installation to download installation script
- .
- Change permission of script to 777 or 775
- Execute script ./ insights_postgres12.sh
- 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
- Download Refer PostgreSQL Installation to download UBUNTU installation script from Ubuntu Script .
- Change permission of script to 777 or 775
- Execute script ./insights_postgre12_Ubuntu.sh
- Check status of service using
...
sudo /usr/pgadmin4/bin/setup-web.sh
PostgreSQL Upgrade on Ubuntu
- Make sure that existing postgres 9.5 working
- Take backup of existing database using following command
...
- Stop existing postgres 9.5 database
- Download Refer PostgreSQL Installation to download UBUNTU installation script from Ubuntu Script .
- Change permission of script to 777 or 775
- Execute script ./insights_postgre12_Ubuntu.sh
- Check status of service using
...