What packages I need to install to get Postgres working

Started by Andre Lopesover 16 years ago6 messagesgeneral
Jump to latest
#1Andre Lopes
lopes80andre@gmail.com

Hi,

I have used Postgres on windows, but now I need to develop a website in
Linux envoirnment.

I have installed Ubuntu Desktop, but now I need to know what packages
install to get Postgres working.

Best Regards,
André.

In reply to: Andre Lopes (#1)
Re: What packages I need to install to get Postgres working

On 06/12/2009 21:35, Andre Lopes wrote:

I have used Postgres on windows, but now I need to develop a website in
Linux envoirnment.

I have installed Ubuntu Desktop, but now I need to know what packages
install to get Postgres working.

I think Ubuntu's packaging system is based on the Debian one, so you
should just need to do -

apt-get postgresql-8.3

- to get PG and all it depends on. If you want 8.4, you'll need to get
it from backports.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

#3Andre Lopes
lopes80andre@gmail.com
In reply to: Raymond O'Donnell (#2)
Re: What packages I need to install to get Postgres working

Hi,

Thanks for your reply.

I have installed postgresql 8.3, and now, what I need to do to get things
working? Install PGAdmin? Or there are other steps I need to do to get
things working? For example, how can I define the password for access as
sysadmin?

Best Regads,

On Sun, Dec 6, 2009 at 9:48 PM, Raymond O'Donnell <rod@iol.ie> wrote:

Show quoted text

On 06/12/2009 21:35, Andre Lopes wrote:

I have used Postgres on windows, but now I need to develop a website in
Linux envoirnment.

I have installed Ubuntu Desktop, but now I need to know what packages
install to get Postgres working.

I think Ubuntu's packaging system is based on the Debian one, so you
should just need to do -

apt-get postgresql-8.3

- to get PG and all it depends on. If you want 8.4, you'll need to get
it from backports.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

#4John R Pierce
pierce@hogranch.com
In reply to: Andre Lopes (#3)
Re: What packages I need to install to get Postgres working

Andre Lopes wrote:

Hi,

Thanks for your reply.

I have installed postgresql 8.3, and now, what I need to do to get
things working? Install PGAdmin? Or there are other steps I need to do
to get things working? For example, how can I define the password for
access as sysadmin?

yourusername $ sudo su - postgres
postgres $ psql
...
postgres=# create user yourusername with createdb createrole password
'newpassword';
CREATE USER
postgres= # create database yourusername with owner yourusername;
CREATE DATABASE
postgres=# \q
postgres $ exit
yourusername $ psql
...
yourusername=# ......

this will create a postgres user with the same username as your regular
login, a password, and the privileges to create more databases and users

you might need to add the ubuntu postgres bin directory to your user's
path, I dunno (I don't use ubuntu)

you will undoubtedly want to modify the pg_hba.conf file to suit your
connection and authentication requirements. see the online
documentation for more on this, its in the introduction/tutorial section

#5Jean-Yves F. Barbier
12ukwn@gmail.com
In reply to: Andre Lopes (#3)
Re: What packages I need to install to get Postgres working

Andre Lopes a écrit :

Hi,

Thanks for your reply.

I have installed postgresql 8.3, and now, what I need to do to get
things working? Install PGAdmin? Or there are other steps I need to do

Daemons are active as soon as installation is completed.

to get things working? For example, how can I define the password for
access as sysadmin?

No (IF bubuntu is alike Debian): 'postgres' user don't have a password,
just:
su - (to become root)
su postgres

at this step you're postgres user and can make whatever you want
(even crap: remember Linux consider if you have the right to
become a superuser, you're considered as a responsible user
and have the right to do everything...)

--
Baltimore, n.:
Where the women wear turtleneck sweaters to hide their flea collars.

#6Sam Mason
sam@samason.me.uk
In reply to: John R Pierce (#4)
Re: What packages I need to install to get Postgres working

On Sun, Dec 06, 2009 at 02:21:09PM -0800, John R Pierce wrote:

yourusername $ sudo su - postgres
postgres $ psql

Somebody pointed out to me on this list that you don't need su for that.
The following is equivalent:

sudo -u postgres psql

Also, because it's all one line it plays nicely when running from history.

--
Sam http://samason.me.uk/