From: | Jason Earl <jason(dot)earl(at)simplot(dot)com> |
---|---|
To: | Steve_Miller(at)sil(dot)org |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Getting Started newbie questions) |
Date: | 2003-01-09 17:47:39 |
Message-ID: | 87adiamczo.fsf@npa01zz001.simplot.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Steve_Miller(at)sil(dot)org writes:
> I'm new to both Linux and Postgres
Welcome to the club
> I installed Red Hat 8 on a stand-alone test machine yesterday. I did
> a custom install, and installed everything. So my assumption is that
> everything Red Hat 8 could install was installed, including
> Postgresql.
You will soon find out that in Linux installing *everything* gets a
lot of stuff installed. That's handy when you are first learning to
use Linux (you don't have to worry about installing things later), but
it's probably not a good idea on a production machine.
> I went into Server Settings, Services, and in Service Configuration found
> postgresql. I checked it, so that it would start on reboot. The machine has
> since been rebooted
>
> The tutorial says the Postgresql is stored in /usr/local/pgsql/ and
> /usr/local/pgsql/data. I don't see either one, either as me (Steve) or as
> root. I do see files under /usr/lib/, usr/share/, and usr/include.
The tutorial supposes that you installed from source code. /usr/local
is where you should install packages that you install from source code
instead of via RPM. On my Debian machine the actual database is
stored in /var/lib/postgres, and the various binaries are somewhere in
the /usr diretories RedHat is probably similar. Learning the hows,
whys, and wheres of the Linux filesystem is pretty useful stuff, but
it isn't necessary for running PostgreSQL.
> The tutorial says to try to create a new database with
>
> $ createdb mydb
>
> I get the error:
>
>
> psql: FATAL 1: user "Steve" does not exist
> createdb: database creation failed.
That's actually a good sign. It would appear that PostgreSQL is up
and running, the problem is that you don't have a PostgreSQL user
named "Steve" yet. What you need to do is create such a user. To do
so you will need to change to the postgres user. Since the postgres
user probably doesn't have a password (for security reasons) this is a
two step process.
1. Change to the root user using the `su' command:
su
(you will need to type in the root password).
2. Change to the postgres user using the su command again. I usually
do this by typing:
su - postgres
You can read the su man page by typing `man su' to see why it is that
I called it that way.
Once you are logged in as the postgres user you should be able to run
all of the createdb and createuser commands that you want.
> This sounds to me like postmaster is running. But what do I know?
>
> The tutorial says to try the command with the absolute path:
>
> /usr/local/pgsql/bin/createdb mydb
>
> I get the error:
>
> No such file or directory
>
> No surprise there. I already saw that I couldn't find a /usr/local/pgsql
>
> Steve
Yes, PostgreSQL isn't installed in that directory. Try typing:
which createdb
this should show you where createdb is actually installed. You also
might want to play with the `locate' command.
Good Luck,
Jason
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Peck | 2003-01-09 17:48:40 | Re: Getting Started newbie questions) |
Previous Message | Devinder K Rajput | 2003-01-09 17:05:56 | Re: Getting Started newbie questions) |