Return to Snippet

Revision: 48424
at July 1, 2011 04:09 by ragnarokkrr


Initial Code
#Fedora 
% sudo rpm -Uvh http://yum.pgrpms.org/reporpms/8.4/pgdg-fedora-8.4-2.noarch.rpm

% sudo yum install postgresql postgresql-server postgresql-contrib

#Initialize
% service postgresql initdb

# Edit conf adding permited addresses and port
% nano -w /var/lib/pgsql/data/postgresql.conf

# listen_addresses = '*'
# port = 5432

# Edit damned pg_hba.conf and allow login for no encryption for local and network connections

# "local" is for Unix domain socket connections only
local   all         all                               password
#IPv4 local connections:
host    all         all         127.0.0.1/32          password

# Start postgres

% service postgresql start

# Create database
% su postgres
% createdb test

# Login on database
% psql test

# Create new role with grants to database
test=# 

# Create new superuser to connect to test database
test=#  CREATE ROLE testuser WITH SUPERUSER LOGIN PASSWORD 'test';

Initial URL
http://www.if-not-true-then-false.com/2010/howto-install-postgresql-8-4-database-server-on-centos-fedora-red-hat/

Initial Description

                                

Initial Title
Postgres - Install and Create databases and users for Fedora 14

Initial Tags
Bash

Initial Language
Bash