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

Re: how to start postgresql server at machine startup?



On Tue, Oct 28, 2008 at 9:01 PM, Ben Olive <ben.olive@gatech.edu> wrote:
> Try this:
>
> Install sysv-rc-conf (available through apt)
> run it, you will see a list of all of your startup daemons. Ensure that
> postgresql is set to run at 3,4,5
>
> --Ben
the 2,3,4,5 are all checked for postgresql, and from
system-admin-services, i can also find postgresql is checked, so i
guess that, postgresql has already been started at system startup, but
it doesn't know where to find the data and log folders, so i need to
manually execute the command which contains correct data and log
folders info:
postgres -D /var/lib/postgresql/data > /var/lib/postgresql/log/logfile 2>&1 &

thanks

> On Tue, Oct 28, 2008 at 6:14 AM, Ron Johnson <ron.l.johnson@cox.net> wrote:
>>
>> On 10/28/08 04:26, Star Liu wrote:
>>>
>>> On Tue, Oct 28, 2008 at 3:26 PM, Jeff D <fixedored@gmail.com> wrote:
>>>>
>>>> On Tue, 28 Oct 2008, 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
>>>>>
>>>>>>> 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
>>>>>
>>>> Are you sure its not starting and just listening on the localhost
>>>> interface?  This is how it comes configured by default.  If you want it
>>>> to
>>>> listen on a different interface you have to edit
>>>> /etc/postgresql/8.3/main/postgresql.conf to reflect that and restart it
>>>> through /etc/init.d/postgresql-8.3 restart .
>>>
>>> my /etc/postgresql folder has nothing inside, did i miss some process
>>> for postgresql server? thanks
>>
>> Are you sure that you installed "it" properly?
>>
>> --
>> 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.
>>
>>
>> --
>> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a
>> subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>>
>
>



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