Thread: installation problem -please help

installation problem -please help

From
nandalal gunaratne
Date:


Hi,
I am installing postgresql 7.0.3 again from scratch on my new PC. I have got
stuck again at the the initdb step. I cannot   remember how I got it to run
last time!! But it has been one  recurrent problem for me. I wonder why? I
want a smooth installation :-)

Here you are
[root@localhost bin] # mkdir /usr/local/pgsql/data
[root@localhost bin] # chown -R postgres:postgres /usr/local/pgsql/data
[root@localhost bin]# su postgres
[postgres@localhost bin]$ cd /usr/local/pgsql/bin
[postgres@localhost bin]$ ./initdb /usr/local/pgsql/data
This database system will be initialized with username "postgres".
This user will own all the data files and must also own the server process.

Creating database system directory /usr/local/pgsql/data
Creating database system directory /usr/local/pgsql/data/base
Creating database XLOG directory /usr/local/pgsql/data/pg_xlog
Creating template database in /usr/local/pgsql/data/base/template1
Creating global relations in /usr/local/pgsql/data/base
Adding template1 database to pg_database
./initdb: /root/tmp/initdb.1626: Permission denied
./initdb: /root/tmp/initdb.1626: Permission denied
./initdb: /root/tmp/initdb.1626: Permission denied
./initdb: /root/tmp/initdb.1626: Permission denied
rm: cannot remove `/root/tmp/initdb.1626': Permission denied

initdb failed.
Removing /usr/local/pgsql/data.
Removing temp file /root/tmp/initdb.1626.
rm: cannot remove `/root/tmp/initdb.1626': Permission denied
Failed.

:-(

I tried chown -R postgres:postgres /root/tmp too
No luck!
Thanks for your help!

Nandalal

Re: installation problem -please help

From
"Josh Berkus"
Date:
Nandalal,

> I am installing postgresql 7.0.3 again from scratch on my new PC. I
> have got
> stuck again at the the initdb step. I cannot   remember how I got it
> to run
> last time!! But it has been one  recurrent problem for me. I wonder
> why? I
> want a smooth installation :-)

Hmm.  I haven't seen that particular one before.

First, how about you download the current version (7.1.3)?  There are no
advantages to using 7.0.3, and quite a few disadvantages.

Then, after the initdb process errors out, check for that file and see
what permissions are on it.  I'm also curious why anything is being done
in /root/tmp.  Is your system set up so that /root/tmp is the general
temp directory?  Was, perhaps, the postgres user set up with /root/ as a
home directory?

-Josh


______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

Re: installation problem -please help

From
Vijay Deval
Date:
I think entire pgsql directory should be owned by postgres:postgres. The
directory under /usr/src also should be owned by postgres:postgres

Vijay

nandalal gunaratne wrote:
>
> Hi,
> I am installing postgresql 7.0.3 again from scratch on my new PC. I have got
> stuck again at the the initdb step. I cannot   remember how I got it to run
> last time!! But it has been one  recurrent problem for me. I wonder why? I
> want a smooth installation :-)
>
> Here you are
> [root@localhost bin] # mkdir /usr/local/pgsql/data
> [root@localhost bin] # chown -R postgres:postgres /usr/local/pgsql/data