Postgresql installation problem

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

Postgresql installation problem

От:
"Pierre-Alexis Paquin" <papaquin@i2m.fr>
Дата:
Hi
 
I have installed a 7.1.3 postgresql version on my linux server. (RedHat 7.2)
 
When I type "createuser xxxxxxxx" it asks me :  Shall the new user allowed to create databases (y/n)?
                                                                        Shall the new user allowed to create more new user (y/n)?
 
I answer yes to the both questions and then a bug report said :
    " psql : connetDbstart()  -- connect() failed - no such file or directory
     Is the postmaster running locally and accepting connections on Unix socket :'/tmp/.s.PSQL.5432'
   createuser : creation of user 'xxxxxxx' failed.
 
I already had answers to this but I am a newbie in linux, so i didn't understand what i have to do exactly to resolve this problem.
 
Someone wrote me :
1. Did you initialized your database with initdb ?
2. Have you started Postgres with postmaster -i   or pg_ctl start ?
3. Have you modified parameters in $PGDATA/postgresql.conf file ?
Follow your answers, you have solved your problem
 
1.When i type initdb it said me that it's not possible to create specific directories (pgsql and data)
2. How am I supposed to use the postmaster or pg_ctl ??
3. The installation is not complete so i haven't a postgresql.conf file ....
 
Thanks for your help.
Pierre-Alexis

Re: Postgresql installation problem

От:
"William N. Zanatta" <william@veritel.com.br>
Дата:
I'm also a newbie on postgresql. The first time I installed it was last 
friday. But I'll give a shot! Any mistakes, please correct me guys!

> 1. Did you initialized your database with initdb ?

This step creates the base files needed to run PSQL.
I'll assume you're running postgresql as postgres user.
Firstly, create a directory like data in your psql home directory. Then, 
if the owner is not the postgres user, give him the ownershio of it. 
Something like:

    # cd /usr/local/psql
    # mkdir data
    # chown postgres:users data
    # chmod 755 data

the '#' means I'm root!

now, initdb...

    # su postgres
    $ pwd
  /usr/local/psql
    $ cd bin
    $ ./initdb -D /usr/local/psql/data

the '$' means I'm a normal user like 'postgres' in this case

> 2. Have you started Postgres with postmaster -i   or pg_ctl start ?

Now you must start your postgresql daemon as postgres user. YOU CANNOT 
START POSTGRESQL AS ROOT.

    $ pwd
  /usr/local/psql/bin
    $ ./postmaster -i -D /usr/local/psql/data &

ok now your daemon should be started...

> 3. Have you modified parameters in $PGDATA/postgresql.conf file ?
> Follow your answers, you have solved your problem

you can do it later. for now, check if it is working as you wish.


See ya,

William Zanatta

Re: Postgresql installation problem

От:
Andrew Gould <andrewgould@yahoo.com>
Дата:
To initialize the database, the database user must
have the proper permissions to create the database
directories you've mentioned (pgsql, pgsql/data).

Assuming the following:
Database User: postgres
Databsase User's group: database
Database directory: /var/lib/pgsql/data

1. Read the online documentation for your version at
http://www.us.postgresql.org/users-lounge/docs/

2. As root:
create the group database in /etc/group
create the user postgres
  mkdir -p /var/lib/pgsql/data
  chown -R postgres.database /var/lib/pgsql/

3. Login as postgres and:
add the next 2 lines to postgres' .profile 
  PGDATA=/var/lib/pgsql/data
  export $PGDATA
execute the following from the command line:
  initdb -D /var/lib/pgsql/data
  postmaster -D /var/lib/pgsql/data &

I think this should do it.  If I forgot anything, I'm
sure someone will correct me!  ;-)

Best of luck,

Andrew Gould

--- Pierre-Alexis Paquin  wrote:
> Hi 
> 
> I have installed a 7.1.3 postgresql version on my
> linux server. (RedHat 7.2)
>  
> When I type "createuser xxxxxxxx" it asks me : 
> Shall the new user allowed to create databases
> (y/n)? 
>                                                     
>                    Shall the new user allowed to
> create more new user (y/n)? 
> 
> I answer yes to the both questions and then a bug
> report said : 
>     " psql : connetDbstart()  -- connect() failed -
> no such file or directory
>      Is the postmaster running locally and accepting
> connections on Unix socket :'/tmp/.s.PSQL.5432' 
>    createuser : creation of user 'xxxxxxx' failed.
> 
> I already had answers to this but I am a newbie in
> linux, so i didn't understand what i have to do
> exactly to resolve this problem.
> 
> Someone wrote me : 
> 1. Did you initialized your database with initdb ?
> 2. Have you started Postgres with postmaster -i   or
> pg_ctl start ?
> 3. Have you modified parameters in
> $PGDATA/postgresql.conf file ?
> Follow your answers, you have solved your problem
>  
> 1.When i type initdb it said me that it's not
> possible to create specific directories (pgsql and
> data)
> 2. How am I supposed to use the postmaster or pg_ctl
> ??
> 3. The installation is not complete so i haven't a
> postgresql.conf file ....
> 
> Thanks for your help.
> Pierre-Alexis
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

Re: Postgresql installation problem

От:
"Pierre-Alexis Paquin" <papaquin@i2m.fr>
Дата:
First thanx for the speed of your response.

The problem is that nothing's happened when I launch postmaster.
When I run postmaster - i , the system writes :

    2002-04-15 . 10:47:06  [1016] DEBUG : database system was shut down at
......
    2002-04-15 . 10:47:06  [1016] DEBUG : Checkpoint record at (0,1522276)
    2002-04-15 . 10:47:06  [1016] DEBUG : Redo record at (0,1522276) : undo
record (0,0) shutdown TRUE
    2002-04-15 . 10:47:06  [1016] DEBUG : NextTransactionId : 615 ;
NextOid:18720
    2002-04-15 . 10:47:06  [1016] DEBUG : database system is in production
state
and it does nothing else, I don't have the prompt.

when i make CTRL-C to interrupt, the sytem writes : database was shutdown.

I think the database system starts well but there is a problem that I don't
know.
I type psql template1 or createdb ...  and nothing's happen.

Thanx for your help
Pierre-Alexis

----- Original Message ----- 
From: "William N. Zanatta" 
To: "Pierre-Alexis Paquin" 
Cc: 
Sent: Monday, April 15, 2002 3:58 PM
Subject: Re: [GENERAL] Postgresql installation problem


> I'm also a newbie on postgresql. The first time I installed it was last 
> friday. But I'll give a shot! Any mistakes, please correct me guys!
> 
> > 1. Did you initialized your database with initdb ?
> 
> This step creates the base files needed to run PSQL.
> I'll assume you're running postgresql as postgres user.
> Firstly, create a directory like data in your psql home directory. Then, 
> if the owner is not the postgres user, give him the ownershio of it. 
> Something like:
> 
>     # cd /usr/local/psql
>     # mkdir data
>     # chown postgres:users data
>     # chmod 755 data
> 
> the '#' means I'm root!
> 
> now, initdb...
> 
>     # su postgres
>     $ pwd
>   /usr/local/psql
>     $ cd bin
>     $ ./initdb -D /usr/local/psql/data
> 
> the '$' means I'm a normal user like 'postgres' in this case
> 
> > 2. Have you started Postgres with postmaster -i   or pg_ctl start ?
> 
> Now you must start your postgresql daemon as postgres user. YOU CANNOT 
> START POSTGRESQL AS ROOT.
> 
>     $ pwd
>   /usr/local/psql/bin
>     $ ./postmaster -i -D /usr/local/psql/data &
> 
> ok now your daemon should be started...
> 
> > 3. Have you modified parameters in $PGDATA/postgresql.conf file ?
> > Follow your answers, you have solved your problem
> 
> you can do it later. for now, check if it is working as you wish.
> 
> 
> See ya,
> 
> William Zanatta
> 

Re: Postgresql installation problem

От:
Tycho Fruru <tycho@fruru.com>
Дата:
http://www.foo.be/docs/unix

hint : '&'

On Wed, 17 Apr 2002, Pierre-Alexis Paquin wrote:

> The problem is that nothing's happened when I launch postmaster.
> When I run postmaster - i , the system writes :
[snip]
> Thanx for your help
> Pierre-Alexis
> 
> ----- Original Message ----- 


-- 
Tycho Fruru			                tycho@fruru.com
"Prediction is extremely difficult. Especially about the future."
  - Niels Bohr



Re: Postgresql installation problem

От:
Tycho Fruru <tycho.fruru@conostix.com>
Дата:
http://www.foo.be/docs/unix

hint : '&'


On Wed, 17 Apr 2002, Pierre-Alexis Paquin wrote:

> The problem is that nothing's happened when I launch postmaster.
> When I run postmaster - i , the system writes :
[snip]
> Thanx for your help
> Pierre-Alexis
> 
> ----- Original Message ----- 

FAQ