View previous topic :: View next topic |
Author |
Message |
kamina Apprentice
Joined: 14 Jun 2004 Posts: 157 Location: Finland
|
Posted: Thu Sep 16, 2004 11:00 am Post subject: problems setting up postresql |
|
|
I'm setting up a server with gentoo, and it should be running apache, postresql and php. Apache is working ok, and I moved on to configuring postresql.
After emerging it I tried to start it up, but it would'nt start:
Code: |
# /etc/init.d/postgresql start
* directory not found: /var/lib/postgresql/data
* You should create PGDATA directory first.
|
I tried searching for newbie guides on setting it up, but they all start from downloading and making the installation. I'm very unclear as to what steps have been made. The paths are all diferant then they where on the installation, but it seems that emerging did pretty much everything listed. The docs advised creating a user called "postgres", but it was allready created. I tried changing the passwrd for the user but it was not allowed... |
|
Back to top |
|
|
kamina Apprentice
Joined: 14 Jun 2004 Posts: 157 Location: Finland
|
Posted: Thu Sep 16, 2004 12:32 pm Post subject: |
|
|
I got a bit further with the advice on this page. There is still one thing I don't understand.
Quote: |
Post emerge config
You have to edit your shadow file, and add /bin/bash as the user postgres's shell.
I guess this must be /etc/passwd but it is done by emerge;
postgres:x:70:70::/var/lib/postgresql:/bin/bash
|
I have that line in my /etc/passwd, but no entry for postgres in /etc/shadow
Quote: |
Changing the users password
passwd postgresql does not work.
|
So what is the password? |
|
Back to top |
|
|
kamina Apprentice
Joined: 14 Jun 2004 Posts: 157 Location: Finland
|
Posted: Fri Sep 17, 2004 5:05 am Post subject: |
|
|
^anyone? |
|
Back to top |
|
|
meteor n00b
Joined: 30 Oct 2002 Posts: 54 Location: Old School Europe
|
Posted: Fri Sep 17, 2004 8:14 am Post subject: |
|
|
First of all, I recommend checking the postgresql docs:
http://www.postgresql.com/docs/7.4/static/index.html
In short (http://www.postgresql.com/docs/7.4/static/installation.html):
Code: |
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test
|
As I remember it Gentoo uses a different directory by default. Possibly it is: /var/lib/postgresql/data/
Also you are probably looking postgres or postmaster and not postgresql? Anyway that is my guess - it has been a while |
|
Back to top |
|
|
|