Mail Archives: cygwin/2007/03/21/17:41:52
Public Mailing Lists schrieb:
> Thanks guys, now I'm a little further:
>
> I installed that cygserver, and now I can start a postgresql with
> /etc/rc.d/init.d/postgresql startlocal
>
> If I try to start the service, I'm getting:
> $ /etc/rc.d/init.d/postgresql start
> Starting PostgreSQL: - cygserver OK - cygrunsrv: Error starting a
> service: OpenS
> ervice: Win32 error 1060:
> Der angegebene Dienst ist kein installierter Dienst.
> [This is a German Windows, and the above message translates to English
> like "the service is not an installed service"]
>
> ERROR service start FAILED
> LOG: shutting down
> LOG: database system is shut down
> LOG: database system was shut down at 2007-03-12 09:33:04
> LOG: checkpoint record is at 0/ABCF48
> LOG: redo record is at 0/ABCF48; undo record is at 0/0; shutdown TRUE
> LOG: next transaction ID: 544; next OID: 17230
> LOG: database system is ready
> LOG: received smart shutdown request
> LOG: shutting down
> LOG: database system is shut down
>
> I would rather like to start everything at boot time with init.
> Is there anything else I need to do?
If you want to start it as service you must assign the proper
permissions for the user SYSTEM (see the init.d script),
and install the service.
The init.d script even does this for you, as it did for with startlocal.
The README describes all necessary steps.
$ less /usr/share/doc/Cygwin/postgresql-8.0.7.README
For the impatient: install as service (hard)
# save old database (optional)
pg_dumpall -g /tmp/$$pgdump-globals.sql
pg_dumpall > /tmp/$$pgdump.sql
# adjust the settings in /etc/rc.d/init.d/postgresql
nano /etc/rc.d/init.d/postgresql
sysbash # /etc/rc.d/init.d/postgresql initdb
/etc/rc.d/init.d/postgresql install
/etc/rc.d/init.d/postgresql start
For the impatient: install as user (easy)
cygrunsrv -S cygserver
initdb -D /usr/share/postgresql/data
pg_ctl start -D /usr/share/postgresql/data -l /var/log/postgresql.log
createdb
psql
> Igor Peshansky wrote:
>
>> On Sun, 11 Mar 2007, Brian Dessent wrote:
>>
>>
>>
>>> Public Mailing Lists wrote:
>>>
>>>
>>>> I'm trying to setup a Postgresql server on Windows-XP/Cygwin. I've done
>>>> this a couple of times on Linux, and I'm experiencing some difficulties
>>>> on Windows.
>>>>
>>>> I have installed the packages postgresql (version 8.0.7-1) and
>>>> cygrunserv (version 1.17-1), and I have syslog and init running.
>>>>
>>>> If I'm trying to run /etc/rc.d/init.d/postgresql initdb, and I'm
>>>> getting
>>>> the following error messages:
>>>>
>>> "Bad system call" usually indicates that you need cygserver installed
>>> and running. And reading /usr/share/doc/Cygwin/postgresql-*.README
>>> confirms this. Read /usr/share/doc/Cygwin/cygserver.README for details.
>>>
>>
>> And it's an FAQ:
>> <http://cygwin.com/faq/faq.programming.html#faq.programming.ipc>.
>> Igor
>>
>>
>
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -