Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

SuSE Linux and PostgreSQL

Question posted by: SmoothJazz (Guest) on November 23rd, 2005 02:03 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??
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
Nikolay A Mirin's Avatar
Nikolay A Mirin
Guest
n/a Posts
November 23rd, 2005
02:03 AM
#2

Re: SuSE Linux and PostgreSQL
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@Jazz.com> wrote in message
news:Xns95CF6C51B4562SmoothJazz@216.196.97.131...[color=blue]
> 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??[/color]



SmoothJazz's Avatar
SmoothJazz
Guest
n/a Posts
November 23rd, 2005
02:03 AM
#3

Re: SuSE Linux and PostgreSQL
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@mail.ru> wrote in
news:JLyGd.8412$pZ4.2998@newsread1.news.pas.earthl ink.net:
[color=blue]
> 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.[/color]

 
Not the answer you were looking for? Post your question . . .
183,962 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors