PDA

View Full Version : How to install postgres with installshield



Rakesh_mahajan
06-22-2004, 05:11 AM
Hi all,

Thanks for your continuous support..
I have to installed postgres on linux using installshield setup.
Currently i do installation of postgres manually.
Steps for installing the postgres are as follows.

First i copy required file in folder say Rakesh.
After that i perform following steps:


[Rakesh]$ ./configure --with-java
[Rakesh]$ gmake
[Rakesh]$ gmake check
[Rakesh]$ su root
[Rakesh]$ Password
[root]# gmake install
[root]# adduser postgres <- deleteuser if screw this up?
[root]# mkdir /usr/local/pgsql/data
[root]# chown postgres /usr/local/pgsql/data
[root]# su - postgres
[postgres]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
[postgres]$ nohup /usr/local/pgsql/bin/postmaster -i -D /usr/local/pgsql/data \
< /dev/null >> server.log 2>&1 < /dev/null &
[postgres]$ /usr/local/pgsql/bin/createuser <<YOUR USER NAME>> (say yes to create a database and new users)


Now please tell me how i can do this using installshieldX.


Thanks & Regards,
Rakesh

BJBear
06-22-2004, 08:59 PM
There is a Wizard Action called "Execute Process" in Universal Installer can do your work.

Execute Process allows you to run an executable program during the installation.

Rakesh_mahajan
06-28-2004, 06:17 AM
I added a wizard action(i.e. Execute Process) .
In thsi i specified the command (i.e. path to a script file).

But at the time of installation it's not going to execute script file?

What would be the problem?

Rakesh_mahajan
06-29-2004, 06:36 AM
I have added execute process but it's not working..
I want that standard output is open when script runs..

Pl reply me soon because it's very urgent..

BJBear
06-29-2004, 08:29 PM
You can see all the standard output in debug mode.

e.g. java -Dis.debug=1 -cp setup.jar run

else you can redirect your output to a logfile. :rolleyes:

Rakesh_mahajan
06-29-2004, 11:45 PM
I have writeen following commands in sh file..



gmake
gmake check
su root
make install
adduser postgres <- deleteuser if screw this up?
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres


When it will execute su root it should ask password of root..How i can do that..

balaidp
09-12-2005, 07:13 AM
help me to soleve the pbm am facing i have the pbm while creating a installer for postgreSQL wht is the path i have to specify in script.

thanks & regards,
Balaji.

fneudert
09-13-2005, 02:22 AM
I think you can use a bean to write some shellscripts.

the first should do

gmake
gmake check

this script can be started by your installer. Be sure to check the returncode.

Then you can build a script, e.g. root.sh which should do

make install
adduser postgres <- deleteuser if screw this up?
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data

after building this script you can ask the installing user to start this script as root, because you cannot make a su from your installer. Ask him to press ok, when he has done this.

then create another script, e.g. postgres.sh which should do the postgres things. Ask the user again to start this script as postgres user.

Another possibility is to prerequisite the postgres user for installation and install right as postgres user. Then you will only need the root.sh

regards Frank.

rvieler
12-01-2006, 02:59 PM
I am using InstallShield for a product that includes postgreSQL, I call a C++ app to install third party stuff like postgresql. The app works with one exception. I cannot get initdb to work.
I have created a standard user using NetUserAdd.
I have given the new user SeServiceLogonRight using LsaAddAccountRights.
I have given the user permission to create the data directory using subinacl.exe.
(after this I can initdb manually from runas and it works fine)
but I cannot automate the initdb process.
Has anyone sucessfully installed postgresql from InstallShield onto a Windows operating system?