Re: Newbie Questions

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: Newbie Questions
Дата
Msg-id 1130151830.30145.84.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на Re: Newbie Questions  (Douglas McNaught <doug@mcnaught.org>)
Список pgsql-general
On Fri, 2005-10-21 at 19:46 -0400, Douglas McNaught wrote:
> Redefined Horizons <redefined.horizons@gmail.com> writes:
>
> > I'm running the latest stable version of PostgreSQL on a Debian Linux box
> > running Gnome 2.0. I've just started setting up my first database with
> > PostgreSQL and I've got a few newbie questions:
>
> I'm going to assume you installed the Debian packages rather than
> installing from source...

...and if you did install from source, they're wherever you put them (as
I frequently tell my daughter)...

The real configuration files for the Debian packages are stored
in /etc/postgresql and /etc/postgresql-common.  There are symbolic links
to those locations in the database directories.

...
> > [2] Can I use the "SU" command to log in as Postgres if I am logged in as
> > a non-root user, or is this only possible as the root user?
>
> If you give the postgres user a Unix password (as root) using the
> 'passwd' command, you should be able to 'su' to that user from any
> account.

But generally that is thought to be inadvisable from a Unix security
point of view, because it also allows anyone to log in as postgres
without your knowing their real identity.  You can use sudo to execute a
command as another user, and then only your own password is needed.

...
> > [4] How do I ensure that the Postmaster server process is started when I
> > reboot my machine?
>
> It should be automatically started if you installed the Debian packages.

If you didn't, look in contrib for an example of an init script.  On
Debian, this should be put into /etc/init.d and then you should use
update-rc.d to set up the links for the runlevels in which you want it
to run.

> > [5] When I'm in PgAdmin III, does it matter if I add a new server as a
> > non-root user, as the root-user, or as the Postgres user? What is the
> > difference between the 3?
>
> Never used it, sorry.

PgAdmin is a client application, so setting up a server means telling
PgAdmin where to find the server you want to connect to.  You should do
it as the user who is going to be using PgAdmin.

...

You do not generally need to use the postgres username; you can set up
your own username as a PostgreSQL superuser and then you can do anything
that postgres can do (except access the Unix files from outside a
database connection).

--
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
   Do you want to know God?   http://www.lfix.co.uk/knowing_god.html


В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: a stored procedure ..with integer as the parameter
Следующее
От: Bohdan Linda
Дата:
Сообщение: Re: SHA1 authentication