/ Published in: Bash
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#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';