[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to start postgresql server at machine startup?



On 10/27/08 22:36, Star Liu wrote:
On Tue, Oct 28, 2008 at 10:58 AM, Ron Johnson <ron.l.johnson@cox.net> wrote:
On 10/27/08 21:07, Star Liu wrote:
I installed postgresql server in my machine, but i does not start
automatically at startup time, so i need to mannually type these
commands to start it everytime when i restart system

Desktop:~# su postgres
Desktop:/root$ cd ~
Desktop:~$ postgres -D ~/data >~/log/logfile 2>&1 &

i tried to add this command line into /etc/X11/Xsession.d/95StarHabit:
Why the heck would you put it in an X script??????????
I do not know, I just put all the things I want to do at system
startup into this file

Stuff like that goes in /etc/init.d/ or /etc/rc.local.

su -c "postgres -D /var/lib/postgresql/data >
/var/lib/postgresql/log/logfile 2>&1 &" postgres
but it doesn't work

how can i make these commands automatically executed at system startup?
 thanks
How did you install PostgreSQL?  If thru a Debian package, then Debian will
handle all this for you.
Yes, i installed it thru debian package, but it doesn't start up at
system startup, so i need to start it by myself, is there anyway to
automate it? thanks

There *must* be a relevant /etc/init.d/postgre* file.

--
Ron Johnson, Jr.
Jefferson LA  USA

Help a man when he is in trouble and he will remember you when
he is in trouble again.


Reply to: