On Thu, Oct 30, 2008 at 5:51 AM,  <[EMAIL PROTECTED]> wrote:
> On Tue, 28 Oct 2008 10:07:13 +0800
> "Star Liu" <[EMAIL PROTECTED]> 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:
>> 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
>
> Normally when you install PostgreSQL in Debian it will automatically
> install the startup script /etc/init.d/postgresql and by default that
> will start when you boot the machine.
>
> You also don't create the log or data directories manually so you must
> have done something wrong during installation.
>
> Try uninstall everything and reinstall it using "the debian way":
>
> # apt-get --purge remove postgresql-8.1
>
> or
>
> # apt-get --purge remove postgresql-8.3 (if you are using lenny).
>
> Remove any log and/or data directories, scripts etc. that you have
> created manually.
>
> Then just install PostgreSQL with:
>
> # apt-get update && apt-get install postgresql-8.1 (or 8.3 if lenny).
>
> Make sure you are ONLY using Debian repos and not something else that
> might provide another version of PostgreSQL.
>
> I manage several PostgreSQL installations daily, and I have never
> experienced the problems you describe.
Thank you very much! Nice to meet you, for you must be a postgresql
expert. I will try your way next time I get trouble with postgresql.

>> --
>> 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) [EMAIL PROTECTED] (xmpp)
>> [EMAIL PROTECTED] HomePage http://starliu dot 9966 dot com
>> [It's only available when my personal machine is running, on which
>> it's hosted.]
>>
>>
>> --
>> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>> with a subject of "unsubscribe". Trouble? Contact
>> [EMAIL PROTECTED]
>>
>>
>
>
> ---
> Best regards
>
> Kim Lesmer
> Programmer/Unix systemadministrator
>
> Web    : www.bitflop.com
> E-mail : [EMAIL PROTECTED]
>
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>



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

Reply via email to