dbTalk Databases Forums  

SuSE Linux and PostgreSQL

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss SuSE Linux and PostgreSQL in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
SmoothJazz
 
Posts: n/a

Default SuSE Linux and PostgreSQL - 12-30-2004 , 10:38 AM






Hi All!

I am wanting to setup/run PostgreSQL on my server (a SuSE Linux 9.2 distro)
but I'm not quite sure which way to go.

I have a few books on PostgreSQL but they don't seem to match the way SuSE
has installed it. The books explain how to install/make/etc. and then how
to setup a "cluster". The directory structure differs alot from the SuSE
install.

It appears that when SuSE installs it, a cluster is already created and it
(PostgreSQL) starts when I boot the box. I have also noticed if I go to the
shell prompt as "root" user and type ENV that no $PGDATA is specified.

Should I ditch the Postgres that came with SuSE - and install it from
scratch, or is there a tutorial or some advice on running it the way SuSE
installed it (advantages for sticking with SuSE's way of doing it?)

At this point, I have no idea how to begin creating a database and tables,
or administrating my PostgreSQL users the "SuSE way".

Can someone please push me in the right direction. It can't be as hard as I
percieve it to be at this point.

Thanks!

P.S. What about updates to PostgreSQL - am I better to stick with SuSE's
RPMs, or download from Postgresql.org and install myself??

Reply With Quote
  #2  
Old   
Nikolay A Mirin
 
Posts: n/a

Default Re: SuSE Linux and PostgreSQL - 01-16-2005 , 12:54 PM






Hi! I am using Fedora and I normally take the rpms from Postgres site.

I guess SuSE is similar to my distribution. So, you need to
switch to a sandbox Postgres user (pgsql in FreeBSD, postgres in RedHat)
and it should have that PGDATA, unless it is specified in -D switch in the
startup script.

But still, you need to switch to that postgres user, than, assuming that
the daemon is runing.

createuser <myusername>

answer "yes" twice, than

psql template1

You connect to a database and set your md5 password or whatever:
ALTER USER <myusername> WITH ENCRYPTED PASSWORD '<your password>';


That edit your pg_hba.conf (add the line for md5 authentication for your new
user, or trust, or whatever) and postgresql.conf as root or postgres user
and restart the daemon. Now you should be able to establish a database
connection from your account.
You'll probably need to play around with pg_hba.conf and postgresql.conf, to
set up the configration you need.

You will probably need:
postgresql.conf
1) enable TCP/IP
2) restrict local socket to a certain group and 770 permissions.
3) add your new superuser to that group and to pg_hba.conf, allowing it
connecting to a database.




"SmoothJazz" <SmoothJazz (AT) Jazz (DOT) com> wrote

Quote:
Hi All!

I am wanting to setup/run PostgreSQL on my server (a SuSE Linux 9.2
distro)
but I'm not quite sure which way to go.

I have a few books on PostgreSQL but they don't seem to match the way SuSE
has installed it. The books explain how to install/make/etc. and then how
to setup a "cluster". The directory structure differs alot from the SuSE
install.

It appears that when SuSE installs it, a cluster is already created and it
(PostgreSQL) starts when I boot the box. I have also noticed if I go to
the
shell prompt as "root" user and type ENV that no $PGDATA is specified.

Should I ditch the Postgres that came with SuSE - and install it from
scratch, or is there a tutorial or some advice on running it the way SuSE
installed it (advantages for sticking with SuSE's way of doing it?)

At this point, I have no idea how to begin creating a database and tables,
or administrating my PostgreSQL users the "SuSE way".

Can someone please push me in the right direction. It can't be as hard as
I
percieve it to be at this point.

Thanks!

P.S. What about updates to PostgreSQL - am I better to stick with SuSE's
RPMs, or download from Postgresql.org and install myself??



Reply With Quote
  #3  
Old   
SmoothJazz
 
Posts: n/a

Default Re: SuSE Linux and PostgreSQL - 01-29-2005 , 12:17 PM



Thanks Nikolay, I appreciate your comments. I have Postgres running, I was just
curious how users of SuSE (and other distros) have theirs setup. I need to find
my way around a bit in Postgres - but I'm beginning to get the hang of it. Then
I'll go back and uninstall from SuSE's way of doing it, and grab the RPMs from
Postgres's web site and install that way.

Thanks again!!


"Nikolay A Mirin" <nikamir (AT) mail (DOT) ru> wrote in
news:JLyGd.8412$pZ4.2998 (AT) newsread1 (DOT) news.pas.earthlink.net:

Quote:
Hi! I am using Fedora and I normally take the rpms from Postgres site.

I guess SuSE is similar to my distribution. So, you need to
switch to a sandbox Postgres user (pgsql in FreeBSD, postgres in
RedHat) and it should have that PGDATA, unless it is specified in -D
switch in the startup script.

But still, you need to switch to that postgres user, than, assuming
that the daemon is runing.

createuser <myusername

answer "yes" twice, than

psql template1

You connect to a database and set your md5 password or whatever:
ALTER USER <myusername> WITH ENCRYPTED PASSWORD '<your password>';


That edit your pg_hba.conf (add the line for md5 authentication for
your new user, or trust, or whatever) and postgresql.conf as root or
postgres user and restart the daemon. Now you should be able to
establish a database connection from your account.
You'll probably need to play around with pg_hba.conf and
postgresql.conf, to set up the configration you need.

You will probably need:
postgresql.conf
1) enable TCP/IP
2) restrict local socket to a certain group and 770 permissions.
3) add your new superuser to that group and to pg_hba.conf, allowing
it connecting to a database.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.