Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying Postgresql Along Windows Application

I have WPF application which using Postgresql as Database engine. I want to install Postgresql engine and restore/attach application-Db to it.

The application's users are non-technical people and they can not install Postgresql individually.

like image 549
Behnam Avatar asked May 25 '12 09:05

Behnam


People also ask

How to download and install PostgreSQL on Windows?

First, go to the PostgreSQL download page where you can download the application using this link: EnterpriseDB. The page should look something like this: Then, select the version that’s compatible with your system. In this case, we will be selecting PostgreSQL Version 12.2 for Windows system 64bit.

How do I deploy a Postgres database to Heroku?

Install the latest version of Postgres, install pgadmin4, install python3, and pip3 install sqlalchemy and psycopg2 The first step to deploying our free Postgres database is to create a free account on Heroku. Heroku is a cloud platform that you can deploy your apps and databases to.

How do I connect to my new Postgres database?

Let’s learn how to connect to your new Postgres database! To connect to your new database, return to the “Resources” page of your Heroku app. You should see the attached add-on “Heroku Postgres”. Click the “Heroku Postgres” link on the bottom right of the below picture to go to the database management page.

What is PostgreSQL and how does it work?

PostgreSQL is one of the most popular relational database management systems in the world powering some of the biggest businesses. If you download Postgres, you may be annoyed to find that you can only host it on your machine’s localhost server unless you pay a recurring fee to host it on a platform like AWS or Azure.


2 Answers

The application's users are non-technical people and they can not install Postgresql individually.

then try this , silently install PostgreSQL, we are using the similar code in our software deployment

C:\Installer\postgresql-9.0.2-1-windows.exe  --serverport 5432 --servicename postgres_service --locale C --superaccount Myadmin --superpassword Mypassword --unattendedmodeui minimal --debuglevel 2 --mode unattended 

run this as the bat file , install in the background

  1. postgresql-9.0.2-1-windows.exe

This is your exe

  1. serverport 5432

This is your port number where you want to install Postgres

  1. superaccount Myadmin

You use account name

  1. superpassword Mypassword

Your user password

keep the rest same. This will directly install to c:\Program Files

like image 112
PresleyDias Avatar answered Oct 12 '22 12:10

PresleyDias


I presume you want to deploy on Windows, so you can include PostgrSQL in your application installer, you can create an application installer for example with InnoSetup ...

like image 35
aleroot Avatar answered Oct 12 '22 13:10

aleroot