- sudo yum update -y
- sudo yum install -y 'postgresql-server > 8.4'
- sudo chkconfig postgresql on
- sudo service postgresql initdb
- sudo service postgresql start
- sudo passwd postgres (change the bloody password!)
- su - postgres -c 'PGPASSWORD=spacepw; createdb spaceschema ; createlang plpgsql spaceschema ; yes $PGPASSWORD | createuser -P -sDR spaceuser'
- sudo service postgresql restart
Update /var/lib/pgsql/data/pg_hba.conf
- Add this before all the other lines:
- local spaceschema spaceuser md5
- host spaceschema spaceuser 127.0.0.1/8 md5
- host spaceschema spaceuser <anyothermgmtip>/24 md5 #this is for external mgmt
- host spaceschema spaceuser ::1/128 md5
Update /var/lib/pgsql/data/postgresql.conf
- Add this to the top, or down in the relevant section
- sudo nano /var/lib/pgsql/data/postgresql.conf
- listen_addresses='*'
Bounce the DBMS service to reflect the changes made
- sudo service postgresql restart
Configure firewall to allow external (of host) connection to the DBMS. I am using PGadmin v1.14 to access the DBMS from my Win7 development workstation.
- system-config-firewall-tui
- add custom tcp incoming port 5432
Lastly you'll want to have PostgreSQL service start on system boot. The command listed below will create the necessary symlinks to make that happen
After all this is done, PGadmin 'should' be able to connect and the database should be running and configured to support the pending Spacewalk installation.
- sudo chkconfig postgresql on
After all this is done, PGadmin 'should' be able to connect and the database should be running and configured to support the pending Spacewalk installation.
No comments:
Post a Comment