Обсуждение: Newbie [CentOS 5.2] service postgresql initdb

Поиск
Список
Период
Сортировка

Newbie [CentOS 5.2] service postgresql initdb

От
Daneel
Дата:
While going through
http://wiki.postgresql.org/wiki/Detailed_installation_guides
and typing
service postgresql start
as root I got
"/var/lib/pgsql/data is missing. Use "service postgresql initdb" to
initialize the cluster first."

When I run
service postgresql initdb
I get
"se:     [FAILED]".
However, /var/lib/pqsql/data is created and user postgres owns it.

But then I run
service postgresql start
and the very same error occurs..

Daneel

Re: Newbie [CentOS 5.2] service postgresql initdb

От
Tom Lane
Дата:
Daneel <dan@dan.dan> writes:
> When I run
> service postgresql initdb
> I get
> "se:     [FAILED]".
> However, /var/lib/pqsql/data is created and user postgres owns it.

Is there anything in /var/lib/pgsql/pgstartup.log ?  How about the
main /var/log/messages file?

            regards, tom lane

Re: Newbie [CentOS 5.2] service postgresql initdb

От
Martin Marques
Дата:
Daneel escribió:
> While going through
> http://wiki.postgresql.org/wiki/Detailed_installation_guides
> and typing
> service postgresql start
> as root I got
> "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to
> initialize the cluster first."
>
> When I run
> service postgresql initdb
> I get
> "se:     [FAILED]".
> However, /var/lib/pqsql/data is created and user postgres owns it.
>
> But then I run
> service postgresql start
> and the very same error occurs..

As root:

# mv /var/lib/pqsql/data /var/lib/pqsql/data.old
# service postgresql initdb
# service postgresql start

See what /var/lib/pqsql/data.old contains. Maybe an old DB Cluster?

Re: Newbie [CentOS 5.2] service postgresql initdb

От
"Scott Marlowe"
Дата:
On Tue, Aug 12, 2008 at 9:25 AM, Daneel <dan@dan.dan> wrote:
> While going through
> http://wiki.postgresql.org/wiki/Detailed_installation_guides
> and typing
> service postgresql start
> as root I got
> "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to
> initialize the cluster first."
>
> When I run
> service postgresql initdb
> I get
> "se:     [FAILED]".
> However, /var/lib/pqsql/data is created and user postgres owns it.
>
> But then I run
> service postgresql start
> and the very same error occurs..

Is /var/lib/pgsql/data a sym link to some other drive?  It's likely
you're being bitten by SELinux.  either disable it (google is your
friend) or reconfigure it to allow postgres to access the other drive
as a service.

Re: Newbie [CentOS 5.2] service postgresql initdb

От
"Scott Marlowe"
Дата:
PLEASE DON'T WRITE TO THIS LIST WITH A FAKE EMAIL ADDRESS.

It's been discussed before, but it's rude and counterproductive.  Just
set up a filter / account that drops everything coming in, but don't
stick the rest of us with your broken email behaviour

On Tue, Aug 12, 2008 at 9:25 AM, Daneel <dan@dan.dan> wrote:
> While going through
> http://wiki.postgresql.org/wiki/Detailed_installation_guides
> and typing
> service postgresql start
> as root I got
> "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to
> initialize the cluster first."
>
> When I run
> service postgresql initdb
> I get
> "se:     [FAILED]".
> However, /var/lib/pqsql/data is created and user postgres owns it.
>
> But then I run
> service postgresql start
> and the very same error occurs..
>
> Daneel
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

Re: Newbie [CentOS 5.2] service postgresql initdb

От
Daneel
Дата:
Scott Marlowe wrote:
> PLEASE DON'T WRITE TO THIS LIST WITH A FAKE EMAIL ADDRESS.
>
> It's been discussed before, but it's rude and counterproductive.  Just
> set up a filter / account that drops everything coming in, but don't
> stick the rest of us with your broken email behaviour

I'm sorry, just followed a guide setting up newsgroups. I've put it
right. I also didn't see that it could cause any difficulties to others.

Daneel

>
> On Tue, Aug 12, 2008 at 9:25 AM, Daneel <dan@dan.dan> wrote:
>> While going through
>> http://wiki.postgresql.org/wiki/Detailed_installation_guides
>> and typing
>> service postgresql start
>> as root I got
>> "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to
>> initialize the cluster first."
>>
>> When I run
>> service postgresql initdb
>> I get
>> "se:     [FAILED]".
>> However, /var/lib/pqsql/data is created and user postgres owns it.
>>
>> But then I run
>> service postgresql start
>> and the very same error occurs..
>>
>> Daneel
>>
>> --
>> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-general
>>
>

Re: Newbie [CentOS 5.2] service postgresql initdb

От
Daneel
Дата:
Scott Marlowe wrote:
> On Tue, Aug 12, 2008 at 9:25 AM, Daneel <dan@dan.dan> wrote:
>> While going through
>> http://wiki.postgresql.org/wiki/Detailed_installation_guides
>> and typing
>> service postgresql start
>> as root I got
>> "/var/lib/pgsql/data is missing. Use "service postgresql initdb" to
>> initialize the cluster first."
>>
>> When I run
>> service postgresql initdb
>> I get
>> "se:     [FAILED]".
>> However, /var/lib/pqsql/data is created and user postgres owns it.
>>
>> But then I run
>> service postgresql start
>> and the very same error occurs..
>
> Is /var/lib/pgsql/data a sym link to some other drive?

No, it didn't.

   It's likely
> you're being bitten by SELinux.  either disable it (google is your
> friend) or reconfigure it to allow postgres to access the other drive
> as a service.
>

I going to learn more about SELinux later after I learn more Linux
basics and get them in common for me.

Thank you anyway

Daneel

Re: Newbie [CentOS 5.2] service postgresql initdb

От
Devrim GÜNDÜZ
Дата:
On Tue, 2008-08-12 at 17:25 +0200, Daneel wrote:
>
> When I run
> service postgresql initdb
> I get
> "se:     [FAILED]".
> However, /var/lib/pqsql/data is created and user postgres owns it.
>
> But then I run
> service postgresql start
> and the very same error occurs..

Anything in /var/lib/pgsql/pgstartup.log file?

--
Devrim GÜNDÜZ
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                   http://www.gunduz.org


Вложения