Ah the smell of a fresh install.  Not as good as the smell of a new car but here’s some useful notes.

how to create new user:
[eric@firedragon ~]$ su
Password:
[root@firedragon eric]# su – postgres
-bash-3.2$ createuser –pwprompt
Enter name of role to add: mneme13
Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
CREATE ROLE
-bash-3.2$

how to check roles:
connect using psql command line tool as superuser:
-bash-3.2$ psql
postgres=# \du

in my case this gives:
List of roles
Role name | Superuser | Create role | Create DB | Connections | Member of
———–+———–+————-+———–+————-+———–
mneme13   | no        | no          | yes       | no limit    |
postgres     | yes      | yes        | yes       | no limit    |
(2 rows)

now let’s return to my normal user:
postgres=# \q
-bash-3.2$ su – eric
Password:
[eric@firedragon ~]$



2 Responses to “PostgreSQL on CentOS”  

  1. 1 Eric

    other useful stuff

    in postgresql.conf
    listen_addresses = ‘*’

    in pg_hba.conf
    host all all 127.0.0.1 255.255.255.255 md5

    for selinux as root
    /usr/sbin/setsebool -P httpd_can_network_connect_db 1

  2. 2 Eric

    i spent about 5 hours on the fluxbb irc channel talking with two of the developers. there were some install issues with using posgre as the db. we worked through it and now the problem is solved and in the latest svn. all i have to say is these guys are very dedicated and very cool. with devs like this at the top of fluxbb this project will have a long and successful run.


Leave a Reply

You must log in to post a comment.