By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,156 Members | 1,071 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,156 IT Pros & Developers. It's quick & easy.

SuSE Linux and PostgreSQL

P: n/a
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??
Nov 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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" <Sm********@Jazz.com> wrote in message
news:Xn************************@216.196.97.131...
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??

Nov 23 '05 #2

P: n/a
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" <ni*****@mail.ru> wrote in
news:JL*****************@newsread1.news.pas.earthl ink.net:
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.

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.