Office of Museum Technology

FLMNH Linux Pages

Florida Museum of Natural History

University of Florida

Installing PostgreSQL on Fedora Core [Under Construction!]


This will install the PostgreSQL database server and the component required to write PHP scripts that communicate with postgres. We use yum to handle dependencies and gather all of the required packages. For more information on PostgreSQL, see http://www.postgresql.org

1. Install PostgreSQL and the component that allows php to talk to PostgreSQL.
 yum -y install postgresql postgresql-server php-pgsql 

2. Configure the new service to start automatically
  /sbin/chkconfig postgresql on
  /sbin/service postgresql start

3. Start the postgresql interactive shell and create your first user and database.

 su - postgres         [The dash is important!]

 psql template1        [template1 is a database that is included by default with PostgreSQL.]


psql#  create user web_user;
psql#  create database web_database owner web_user;
psql#  \q


Edit the postgres host based access configuration file:

/var/lib/pgsql/data/pg_hba.conf

Modify the local line to use "trust" based authentication rather than "identity". Please review the PostgreSQL documentation before making this change and take the security
local	all		all			trust
Restart the database service.

 /sbin/service postgresql restart
4. Test your connection.

 psql -U web_user web_database

5. Following the above steps, the database location on Fedora Core 4 is /var/lib/pgsql/data.
Last Update 7/1/2005 by Dan Stoner

Send us an email:
linuxpages-at-flmnh.ufl.edu
(Replace '-at-' with '@')
FLMNH Linux Pages Home
OMT Home