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

how to start postgresql server at machine startup?

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:
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

I'm a debian user and a web developer(XML+XSLT+AJAX+PostgreSQL+PHP) in
City of Shanghai, China.
Welcome to add my IMs! (msn) starliu@live.com (xmpp) minxinjianxin@gmail.com
HomePage http://starliu dot 9966 dot com [It's only available when my
personal machine is running, on which it's hosted.]

Reply to: