These steps should help you get started with your first database after you have installed PostgreSQL.

1. Use 'su' to become root.

2. Edit '/var/lib/pgsql/data/postgresql.conf' file.

3. Uncomment out the line regarding accepting tcp sockets, set it to true, not false, and save the file.

4. Edit '/var/lib/pgsql/data/pg_hba.conf' file.

5. Uncomment out the line...

local all all trust

...add this line...

host     all       all   127.0.0.1   255.255.255.255  trust

...and save the file.

{Note that the pg_hba.conf is the doorway that can open your system up to hackers. So, I've opened this door wide open for now, but you should read the comments in pg_hba.conf to see how to do this the proper way, not the quick and dirty way.}

{Note also that pgst does not have a way to implement passwords because the psql command prompts for these and we have no way to intercept it. Therefore, you have to implement your pg_hba.conf in trust mode (no password) and I recommend controlling access via IP address and only to certain databases by using host. It is also this technique, plus perhaps some holes punched in your local Linux firewall (iptables) and perhaps additional firewalls on your LAN/WAN, that will permit you to connect pgst from your workstation to a remote PostgreSQL database.}

6. Restart postgresql from Services Control Panel or any means you know how on your version of Linux.

7. Do these commands:

su - postgres
createdb test
createuser -A -D root
exit
psql test
create table names (
firstname varchar (50),
lastname varchar (50)
);
insert into names (firstname, lastname) values ('Marty','Mouse');
insert into names (firstname, lastname) values ('Daphne','Duck');
select * from names;

