Setting up Postgresql for use with Koji – Part Two April 11, 2010Posted by Paul Whalen in ARM, Koji.
In order to authorize the Koji-web and Koji-hub resources to use the postgresql database it was necessary to edit ‘/var/lib/pgsql/data/pg_hba.conf’ and add the following lines:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
host koji koji 127.0.0.1/32 trust
host koji apache 127.0.0.1/32 trust
host koji koji ::1/128 trust
host koji apache ::1/128 trust
local koji apache trust
local koji koji trust
To enble these changes:
root@hongkong# su - postgres
postgres@hongkong$ pg_ctl reload
After this has been completed an intial admin account needs to be added and given privileges to create new users for use with Koji. The admin account is added by executing the following commands:
koji=> insert into users (name, status, usertype) values ('kojiadmin', 0, 0);
koji=> insert into user_perms (user_id, perm_id) values (, 1);
This example is for use with SSL authentication , but Koji can also use a user/password system or Kerberos as a means for authenticating users.
Next… Koji Hub set-up.