On Mon, 1 Mar 2004, Phil Campaigne wrote: > Hello, > I originally installed postgresql as root user and now I am setting up a > development environment with cvs and a java ide and tomcat. I have > everything with the exception of postgresql integreted using a non-root > user. > THe process I am using is to logon as postges and start the database > and do queries from the command line using psql. Then I logoff and logon > as phil and start tomcat and my java ide. > > 1.Is there a better way to start the database and the web application?
Yes, you can edit your /etc/rc.d/rc.local file and add lines something like this: su - postgres -c -- 'pg_ctl start -l $PGDATA/pgsql.log' su - httpd -c -- 'apachectl start' etc... > 2. During setup of postgresql I chown and ghgrp the /usr/local/pgsql > directoy tree to postgres? Not necessary. You just need to chown postgres.postgres whatever directory you're putting in $PGDATA. > 3.However my development environment(i.e. jdbc connection from my > application) doesn't seem to have permission to access to all the files > it needs in postgres? Someone else mentioned it, it's in pg_hba.conf. Also check your firewall installation. > 4. Is is best to install postgresql as user "phil" in order to gain > access for my integrated develoment environment? Not needed. If you createuser as the postgres superuser the user phil and assign him the power to add users, you make him a superuser and he will have every bit as much power as the postgres user. You might want to make two accounts, one for you as a superuser, and one for the application which is just a normal user with security to keep it in place. Enjoy! ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match