Thread: Installation Postgresql

Installation Postgresql

From
Stephen Salbod
Date:
My background is Windows and I just switched, yesterday to, Suse Linux
Professional 9.0. And I have a class project due Monday, which is on why
select postgresql as your DBMS. I am trying to install postgresql and going
nuts. I installed the postgresql package on to my machine. I am following
the short version installation instructions, but I got stuck at the first
step: ./configure . I've looked for it on my system but to no avail. I just
want to get postgresql up and running. Every book I turn to has this
configure file. I know it is my window background that is messing me up--I
can't think Linux right now. I would appreciate if someone can give me hand
so I can have a good experience installing postgresql .

Thank you. Steve



Re: Installation Postgresql

From
Bill Moran
Date:
Stephen Salbod wrote:
> My background is Windows and I just switched, yesterday to, Suse Linux
> Professional 9.0. And I have a class project due Monday, which is on why
> select postgresql as your DBMS. I am trying to install postgresql and
> going nuts. I installed the postgresql package on to my machine. I am
> following the short version installation instructions, but I got stuck
> at the first step: ./configure . I've looked for it on my system but to
> no avail. I just want to get postgresql up and running. Every book I
> turn to has this configure file. I know it is my window background that
> is messing me up--I can't think Linux right now. I would appreciate if
> someone can give me hand so I can have a good experience installing
> postgresql .

The configure script is part of the Posgresql distribution.

When you unpack the archive, and cd to the directory created, configure is
in that directory.  Thus there are two factors that are required in order
for configure to run:
1) The directory must be your current working directory
2) You must use "./configure" to explicitly tell your shell to look in
    the current directory for the file.

I'm guessing #1 is where you're having trouble.  Just do
"cd <directory created by unpacking the download>" prior to "./configure"

If you're using these instructions:
http://www.postgresql.org/docs/7.4/interactive/installation.html
Then that's probably what you're missing.

--
Bill Moran
Potential Technologies
http://www.potentialtech.com

Re: Installation Postgresql

From
Chris
Date:
> [SuSE]
> I would appreciate if someone can give me hand
> so I can have a good experience installing postgresql .

If you're a complete *nix newbie you should consider
using the precompiled PostgreSQL package that comes with
your copy of SuSE. You can install it with Yast.

The ./configure, make, ... steps are NOT necessary then,
they're for compiling from source.

For getting started with PostgreSQL, you can start it
by using the "service" menu entry from the SUSE GUI
(I'm not using this, so I'm guessing the name...)

You should be able to access the database by using the command line
tools from a terminal window: createdb, psql. Try to see the
man pages, or look up the books you cited (or ask again), if
you get stuck.


Bye, Chris.



Re: Installation Postgresql

From
Andrew Ayers
Date:
Chris wrote:
>>[SuSE]
>>I would appreciate if someone can give me hand
>>so I can have a good experience installing postgresql .
>
>
> If you're a complete *nix newbie you should consider
> using the precompiled PostgreSQL package that comes with
> your copy of SuSE. You can install it with Yast.

Yes - I would reccommend this as well, unless the version (of
PostgreSQL) that comes with SuSE does not have certain options you need,
or you have other needs to install from source. Also, be aware that
there are tools that can be installed on you system to convert a .tar.gz
to an RPM or other package style so you can install the packages using
you package manager (though this might be more work than what you want
to do for your project).

> The ./configure, make, ... steps are NOT necessary then,
> they're for compiling from source.

Compiling from source should only be done if you can't find the package
in a format for you package manager, if it didn't come with your set of
packages, or if you need certain features that aren't available in any
pre-made packages. Or, of course, if you have a specific need for the
source (ie, customized source, or you're developing for PG, etc).

> For getting started with PostgreSQL, you can start it
> by using the "service" menu entry from the SUSE GUI
> (I'm not using this, so I'm guessing the name...)

Likely, if you install it using YAST, you can shutdown and reboot and it
should automatically start up via the start up scripts (not as elegant
as doing it "manually" - and you should learn to start/shutdown service
daemons - but you also want to see if it auto starts, too - if the
startup goes by to quickly (or is masked by a graphical overlay), log in
and "cat /var/log/messages | more" to see if it did).

> You should be able to access the database by using the command line
> tools from a terminal window: createdb, psql. Try to see the
> man pages, or look up the books you cited (or ask again), if
> you get stuck.

Tons of reference material and people out there - if there is one thing
good to say about Linux, it is that reference material on just about
every subject and problem exists out there, all one has to do is look
for it (now, sometimes that material is difficult to understand, but
nothings perfect).

Andrew Ayers
Phoenix, Arizona

-- CONFIDENTIALITY NOTICE --

This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain
informationthat is privileged, confidential and exempt from disclosure under applicable law. If you are not the
intendedaddressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use,
copy,disclose or distribute to anyone the message or any information contained in the message. If you have received
thismessage in error, please immediately advise the sender by reply email, and delete the message. Thank you. 

Re: Installation Postgresql

From
Andrew Ayers
Date:
Bill Moran wrote:
> Stephen Salbod wrote:
>
>> My background is Windows and I just switched, yesterday to, Suse Linux
>> Professional 9.0. And I have a class project due Monday, which is on
>> why select postgresql as your DBMS. I am trying to install postgresql

Let this be a lesson - never change your environment if it is "crunch
time", unless you have no other choice. I don't know your situation, but
it sounds like you picked the worst time to begin learning Linux...

>> and going nuts. I installed the postgresql package on to my machine. I
>> am following the short version installation instructions, but I got
>> stuck at the first step: ./configure . I've looked for it on my system
>> but to no avail. I just want to get postgresql up and running. Every
>> book I turn to has this configure file. I know it is my window
>> background that is messing me up--I can't think Linux right now. I
>> would appreciate if someone can give me hand so I can have a good
>> experience installing postgresql .
>
>
> The configure script is part of the Posgresql distribution.
>
> When you unpack the archive, and cd to the directory created, configure is

Did you unpack the archive? You didn't say what form the package was in,
  so I would like to add:

1. Download package (I assume you downloaded a *.tar.gz here???).
2. Unpack the archive (tar -zxf name_of_package.tar.gz).
3. List the directory (ls -a) for reference.
4. Change to the unpacked archive directory (cd name_of_package).
5. "./configure" should be in there.

Note - typically you perform the "./configure, make, make install" dance
as root (most of the time you can do the "./configure" portion as a
user). Something else to keep in mind, in most good packages, you can do
a "./configure --help" to get a list of options for the configure
portion, where you can change where binaries and other items get installed.

Realize that what you are doing, while it is an installation of
software, is not the same as what you are probably used to in the
Windows world - this isn't InstallShield (if you want something closer
to that, a package manager is what you are after, with the appropriate
packages - in SuSE, this is yast/yast2). What you are actually doing
when you do all of this is compiling the application, then the last part
("make install") actually moves all of the binaries and such to their
appropriate places (according to what was done in "./configure" to the
make files).

Also know that, in most cases, you can get rid of the archived package
and the unarchived package directory once you have a successful install
(unless you forsee the need to modify the source or something and
recompile). Some people keep it, some delete it - depends on if there is
really an issue with space on your machine. You might set up a "compiled
packages" directory in some data area on your machine, and keep all of
the archives (or uncompressed archives, your call) in there.

> in that directory.  Thus there are two factors that are required in order
> for configure to run:
> 1) The directory must be your current working directory
> 2) You must use "./configure" to explicitly tell your shell to look in
>    the current directory for the file.

Small tutorial:

"." references the current directory (same as under DOS), whereas ".."
references the "prior" directory (that is, the directory "above" where
you currently are). So, by issuing a "./configure", you are saying "look
in the current directory ("."), and run the "configure" script".

Now, you might ask "I am already in the directory where the configure
script is, why do I need to do this?", and there is a very good reason.
This has to do with how your paths are set up. If you issue the command
"env" in the console, you will see listed (for you user) several
environment variables - one of which is "PATH=blah", where "blah" is all
the paths to search (separated by colons). Most likely (unless you set
it up, or SuSE install did), the current path "." is not among those in
the PATH variable. You can add it, but it isn't always advisable. What
the system does when you issue a command is look in each directory in
the PATH variable in turn for the executable to run - when it finds it,
it runs it (whereever it is) - so, if you had the same executable in two
different directories, both of which are listed in your PATH, the first
one encountered is the one executed. If you had "." listed in your PATH,
depending on where it is listed (typically, you should list it *last*),
"command execution confusion" could result (ie, you would type
"configure" and some other configure script in a different directory on
the PATH would be run).

> I'm guessing #1 is where you're having trouble.  Just do
> "cd <directory created by unpacking the download>" prior to "./configure"
>
> If you're using these instructions:
> http://www.postgresql.org/docs/7.4/interactive/installation.html
> Then that's probably what you're missing.

You have a *lot* to learn about Linux. If you want some of the best
information on Linux (and other open source projects), go to
http://www.oreilly.com/ and order a few books - you won't be sorry.

Good luck - and welcome to PostgreSQL and Linux!

Andrew Ayers
Phoenix, Arizona

-- CONFIDENTIALITY NOTICE --

This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain
informationthat is privileged, confidential and exempt from disclosure under applicable law. If you are not the
intendedaddressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use,
copy,disclose or distribute to anyone the message or any information contained in the message. If you have received
thismessage in error, please immediately advise the sender by reply email, and delete the message. Thank you. 

Re: Installation Postgresql

From
Frank Finner
Date:
On Mon, 26 Apr 2004 10:22:36 -0700 Andrew Ayers <aayers@eldocomp.com> sat down,
thought long and then wrote:

> Bill Moran wrote:
> > Stephen Salbod wrote:
> > 
> >> My background is Windows and I just switched, yesterday to, Suse Linux 
> >> Professional 9.0. And I have a class project due Monday, which is on 
> >> why select postgresql as your DBMS. I am trying to install postgresql 
> 
> Let this be a lesson - never change your environment if it is "crunch 
> time", unless you have no other choice. I don't know your situation, but 
> it sounds like you picked the worst time to begin learning Linux...
> 
> >> and going nuts. I installed the postgresql package on to my machine. I 
> >> am following the short version installation instructions, but I got 
> >> stuck at the first step: ./configure . I've looked for it on my system 
> >> but to no avail. I just want to get postgresql up and running. Every 
> >> book I turn to has this configure file. I know it is my window 
> >> background that is messing me up--I can't think Linux right now. I 
> >> would appreciate if someone can give me hand so I can have a good 
> >> experience installing postgresql .

Hi,

if you are so short in time, go sit at your compi, open yast, install the SuSE
shipped rpm´s. Don´t even think about compiling and installing PostgreSQL from
the sources, it is easy, if you know about SuSE (or other type) Linux, but if
you come from the MS Windows side of life, even don´t know about things like
Cygwin on MS Windows - don´t. Leave that for a quiet moment without pressure.
It´s to much to learn about Linux and PostgreSQL at the same time within less
than one week.

After having installed the SuSE shipped PostgreSQL packages, you simply have to
start the database as root with "rcpostgresql start". If the database is not
initialized, the startup script will do this for you when you start it the first
time. After this you can do everything what´s written in the PostgreSQL
documentation about an _installed_ PostgreSQL system - create users, databases,
tables, queries, database applications... If you want to start PostgreSQL as a
"service" everytime you boot, go to/etc/init.d and say "insserv postgresql". Or
do this also inside yast.

You will not be on the bleeding edge of PostgreSQL databases (I think it is
7.4.0 or 7.4.1 what´s shipped with SuSE 9.0), but you will have a working
database system out of the box.

As soon as you know more about the structures and features of Linux and Unix
systems as a whole (for example, how to install executables out of a source
tarball with configure - make - make install and so on), you should go and
download the PostgreSQL sources and install PostgreSQL from these, because
usually the distribution shipped releases are one or two steps behind.

Good luck!

Frank. 

Re: Installation Postgresql

From
Frank Finner
Date:
On Tue, 27 Apr 2004 19:08:12 +0200 Frank Finner <postgresql@finner.de> sat down,
thought long and then wrote:

> After having installed the SuSE shipped PostgreSQL packages, you simply have
> to start the database as root with "rcpostgresql start". If the database is
> not initialized, the startup script will do this for you when you start it the
> first time.

... this should read "database ENGINE" or "database SERVER" both times, not just
"database"...

Regards, Frank