Thread: Install Postgre while installing Other software.
Hi all!
I'm trying to use Postgre as a DataBase manager of a Software I'm developing. I would like to know how to integrate an installation of Postgre in the installation of my own software. I mean, I need to firstly install Postgre, and when it finishes The rest of the installation of my software would continue. I've done some test with postgresql-8.3.5-1-windows.exe (on-click installer) but when it finishes and tries to run the server it crashes. Do any of you knows why this occurs?. I tried this version because I think it would be easiest for the user because It only shows one or two windows to the users, and they dont need to select many options.
Do you have any experience in the distribution of a Postgre installation in your own developed software? How would you do it?
Thank you in advance for your help.
Best,
Iñigo.
I'm trying to use Postgre as a DataBase manager of a Software I'm developing. I would like to know how to integrate an installation of Postgre in the installation of my own software. I mean, I need to firstly install Postgre, and when it finishes The rest of the installation of my software would continue. I've done some test with postgresql-8.3.5-1-windows.exe (on-click installer) but when it finishes and tries to run the server it crashes. Do any of you knows why this occurs?. I tried this version because I think it would be easiest for the user because It only shows one or two windows to the users, and they dont need to select many options.
Do you have any experience in the distribution of a Postgre installation in your own developed software? How would you do it?
Thank you in advance for your help.
Best,
Iñigo.
On 07/02/2009 15:40, Iñigo Barandiaran wrote: > I'm trying to use Postgre as a DataBase manager of a Software I'm > developing. I would like to know how to integrate an installation of Postgre > in the installation of my own software. I mean, I need to firstly install The community installer (pgInstaller) has a silent-install option which I understand is intended for just this scenario. BTW, the accepted abbreviation of PostgreSQL is "postgres", not "postgre". Ray. ------------------------------------------------------------------ Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals ------------------------------------------------------------------
Hi Raymond!
Thanks for your answer. I'm going to take a look to the silent option you mentioned.
Any link related with this topic would be very appreciated.
Thanks in advance!
Best,
Thanks for your answer. I'm going to take a look to the silent option you mentioned.
Any link related with this topic would be very appreciated.
Thanks in advance!
Best,
2009/2/7 Raymond O'Donnell <rod@iol.ie>
On 07/02/2009 15:40, Iñigo Barandiaran wrote:The community installer (pgInstaller) has a silent-install option which
> I'm trying to use Postgre as a DataBase manager of a Software I'm
> developing. I would like to know how to integrate an installation of Postgre
> in the installation of my own software. I mean, I need to firstly install
I understand is intended for just this scenario.
BTW, the accepted abbreviation of PostgreSQL is "postgres", not "postgre".
Ray.
------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------
Hi.
I've found this page about silent install that was very usefull for me: http://pginstaller.projects.postgresql.org/silent.html
Now, I've found another problem. I'm able to install PostgreSQL with my software in silent mode, but the problem comes when I do un-install. The problem is related with service account.
I'm currently using the followin settings for install:
msiexec /i postgresql-8.3-int.msi /qr INTERNALLAUNCH=1 DOINITDB=1 CREATESERVICEUSER=1 ADDLOCAL=server,psql,pgadmin BASEDIR="c:\postgres" SERVICEDOMAIN="%COMPUTERNAME%" SERVICEPASSWORD="AnyPassWord" SUPERPASSWORD="AnyPassWord2"
If I do un-install the service account is not removed, so next time I try to install the software again the service account name (posgres) exists so It can not be created again, so the installation progress stops, rolling back.
Do you know how can I remove posgres service account while un-installing? or maybe Do you know how to chek if the postgres user exist while installing, so therefore the installation process could create or login with that user?
Thank in advance!
I've found this page about silent install that was very usefull for me: http://pginstaller.projects.postgresql.org/silent.html
Now, I've found another problem. I'm able to install PostgreSQL with my software in silent mode, but the problem comes when I do un-install. The problem is related with service account.
I'm currently using the followin settings for install:
msiexec /i postgresql-8.3-int.msi /qr INTERNALLAUNCH=1 DOINITDB=1 CREATESERVICEUSER=1 ADDLOCAL=server,psql,pgadmin BASEDIR="c:\postgres" SERVICEDOMAIN="%COMPUTERNAME%" SERVICEPASSWORD="AnyPassWord" SUPERPASSWORD="AnyPassWord2"
If I do un-install the service account is not removed, so next time I try to install the software again the service account name (posgres) exists so It can not be created again, so the installation progress stops, rolling back.
Do you know how can I remove posgres service account while un-installing? or maybe Do you know how to chek if the postgres user exist while installing, so therefore the installation process could create or login with that user?
Thank in advance!
2009/2/7 Iñigo Barandiaran <ibarandiaran@vicomtech.org>
Hi Raymond!
Thanks for your answer. I'm going to take a look to the silent option you mentioned.
Any link related with this topic would be very appreciated.
Thanks in advance!
Best,2009/2/7 Raymond O'Donnell <rod@iol.ie>On 07/02/2009 15:40, Iñigo Barandiaran wrote:The community installer (pgInstaller) has a silent-install option which
> I'm trying to use Postgre as a DataBase manager of a Software I'm
> developing. I would like to know how to integrate an installation of Postgre
> in the installation of my own software. I mean, I need to firstly install
I understand is intended for just this scenario.
BTW, the accepted abbreviation of PostgreSQL is "postgres", not "postgre".
Ray.
------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------
Iñigo Barandiaran wrote: > If I do un-install the service account is not removed, so next time I > try to install the software again the service account name (posgres) > exists so It can not be created again, so the installation progress > stops, rolling back. > Do you know how can I remove posgres service account while > un-installing? or maybe Do you know how to chek if the postgres user > exist while installing, so therefore the installation process could > create or login with that user? NET USER POSTGRES /DELETE or some sort of WSH WMI magic.... the problem with reusing an existing service account, you don't know its password silly question, what will your installer do if there is a preexisting Postgres install on the target system?
Thank you all for your answers!.
This solve one of my problems :) THANKS!!!
John, thats a very good question. I've already thought about that, but I've no idea how to act yet. Becuase, as you said, if there is already a posgre Database server installed in the target system, and I dont know the password, what can i do? I can not delete the existing user account because I would be affecting other software. What about if I create another service user account, with a different name, such as MyPostgreUserAccount? That way I ensure that I'm creating/deleting the Postgre User of my application. What do you think?
Thanks in advance!!
This solve one of my problems :) THANKS!!!
John, thats a very good question. I've already thought about that, but I've no idea how to act yet. Becuase, as you said, if there is already a posgre Database server installed in the target system, and I dont know the password, what can i do? I can not delete the existing user account because I would be affecting other software. What about if I create another service user account, with a different name, such as MyPostgreUserAccount? That way I ensure that I'm creating/deleting the Postgre User of my application. What do you think?
Thanks in advance!!
2009/2/8 John R Pierce <pierce@hogranch.com>
Iñigo Barandiaran wrote:NET USER POSTGRES /DELETEIf I do un-install the service account is not removed, so next time I try to install the software again the service account name (posgres) exists so It can not be created again, so the installation progress stops, rolling back.
Do you know how can I remove posgres service account while un-installing? or maybe Do you know how to chek if the postgres user exist while installing, so therefore the installation process could create or login with that user?
or some sort of WSH WMI magic....
the problem with reusing an existing service account, you don't know its password
silly question, what will your installer do if there is a preexisting Postgres install on the target system?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hi John.
Thanks for your comment.
You are right. I als think that option A is the best, but the problem, as you mentioned, it is only suitable for knowlegeable, that I might is not the general case. The "normal" end user only wants to use the software without knowing anything about data bases etc. I think the only suitable option is C, taking into account that maybe is not the most efficient, in terms of memmory or disc consumptions.
And thanks for the comment about IO port. You are right. If we installl a separate paralell distribution, we should change the IO port defined by default.
Thanks again!!!!!!!!
Thanks for your comment.
You are right. I als think that option A is the best, but the problem, as you mentioned, it is only suitable for knowlegeable, that I might is not the general case. The "normal" end user only wants to use the software without knowing anything about data bases etc. I think the only suitable option is C, taking into account that maybe is not the most efficient, in terms of memmory or disc consumptions.
And thanks for the comment about IO port. You are right. If we installl a separate paralell distribution, we should change the IO port defined by default.
Thanks again!!!!!!!!
2009/2/8 John R Pierce <pierce@hogranch.com>
Iñigo Barandiaran wrote:if you install a seperate copy of postgres, in its own directory, with its own service account, you'll also need to change its IO port.Thank you all for your answers!.
This solve one of my problems :) THANKS!!!
John, thats a very good question. I've already thought about that, but I've no idea how to act yet. Becuase, as you said, if there is already a posgre Database server installed in the target system, and I dont know the password, what can i do? I can not delete the existing user account because I would be affecting other software. What about if I create another service user account, with a different name, such as MyPostgreUserAccount? That way I ensure that I'm creating/deleting the Postgre User of my application. What do you think?
perhaps a better option would be to notify the user that postgres was already installed on the system, and ask the user if
A) they want to use the existing postgres (which would have to be version 8.something you require naturally) and if so, what the postgres account password is so you can create your databases (note this isn't the service account password, this is the password of the postgres database superuser.
or,
B) if they don't want the current postgres, tell them they can uninstall it via add/remove and restart your installler
or,
C) said seperate parallel installation, with its own dir, port, and account.
obviously, option A) is only suitable for the knowlegeable user.