Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problems setting up postresql
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
kamina
Apprentice
Apprentice


Joined: 14 Jun 2004
Posts: 157
Location: Finland

PostPosted: Thu Sep 16, 2004 11:00 am    Post subject: problems setting up postresql Reply with quote

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
View user's profile Send private message
kamina
Apprentice
Apprentice


Joined: 14 Jun 2004
Posts: 157
Location: Finland

PostPosted: Thu Sep 16, 2004 12:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
kamina
Apprentice
Apprentice


Joined: 14 Jun 2004
Posts: 157
Location: Finland

PostPosted: Fri Sep 17, 2004 5:05 am    Post subject: Reply with quote

^anyone?
Back to top
View user's profile Send private message
meteor
n00b
n00b


Joined: 30 Oct 2002
Posts: 54
Location: Old School Europe

PostPosted: Fri Sep 17, 2004 8:14 am    Post subject: Reply with quote

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 :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum